Tracker: Fix #8388.
BNavigator shouldn't update its location until AllAttached(). Otherwise, it might immediately trigger a redraw, and in such a case, the navigation buttons wouldn't yet have had a chance to load their icon resources, leading to a debug assert in BPictureButton due to said images not being present, but required.
This commit is contained in:
@@ -179,9 +179,6 @@ BNavigator::~BNavigator()
|
|||||||
void
|
void
|
||||||
BNavigator::AttachedToWindow()
|
BNavigator::AttachedToWindow()
|
||||||
{
|
{
|
||||||
// Inital setup of widget states
|
|
||||||
UpdateLocation(0, kActionSet);
|
|
||||||
|
|
||||||
// All messages should arrive here
|
// All messages should arrive here
|
||||||
fBack->SetTarget(this);
|
fBack->SetTarget(this);
|
||||||
fForw->SetTarget(this);
|
fForw->SetTarget(this);
|
||||||
@@ -190,6 +187,14 @@ BNavigator::AttachedToWindow()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BNavigator::AllAttached()
|
||||||
|
{
|
||||||
|
// Inital setup of widget states
|
||||||
|
UpdateLocation(0, kActionSet);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BNavigator::Draw(BRect)
|
BNavigator::Draw(BRect)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ protected:
|
|||||||
virtual void Draw(BRect rect);
|
virtual void Draw(BRect rect);
|
||||||
virtual void MessageReceived(BMessage* msg);
|
virtual void MessageReceived(BMessage* msg);
|
||||||
virtual void AttachedToWindow();
|
virtual void AttachedToWindow();
|
||||||
|
virtual void AllAttached();
|
||||||
|
|
||||||
void GoForward(bool option); // is option key held down?
|
void GoForward(bool option); // is option key held down?
|
||||||
void GoBackward(bool option);
|
void GoBackward(bool option);
|
||||||
|
|||||||
Reference in New Issue
Block a user