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:
Rene Gollent
2013-08-07 19:42:52 -04:00
parent f4e16e73d5
commit b939c39167
2 changed files with 9 additions and 3 deletions
+8 -3
View File
@@ -179,9 +179,6 @@ BNavigator::~BNavigator()
void
BNavigator::AttachedToWindow()
{
// Inital setup of widget states
UpdateLocation(0, kActionSet);
// All messages should arrive here
fBack->SetTarget(this);
fForw->SetTarget(this);
@@ -190,6 +187,14 @@ BNavigator::AttachedToWindow()
}
void
BNavigator::AllAttached()
{
// Inital setup of widget states
UpdateLocation(0, kActionSet);
}
void
BNavigator::Draw(BRect)
{
+1
View File
@@ -98,6 +98,7 @@ protected:
virtual void Draw(BRect rect);
virtual void MessageReceived(BMessage* msg);
virtual void AttachedToWindow();
virtual void AllAttached();
void GoForward(bool option); // is option key held down?
void GoBackward(bool option);