Postpone updating statu bar panes after they were actually created.
Setting the status bar fields contents before setting the number of them
failed resulting in debug error messages and the text not appearing in the
status bar.
Closes #13670.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69761
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
int *pWidths = new int[count];
int nCurPos = 0;
- for ( int i = 0; i < count; i++ )
+ int i;
+ for ( i = 0; i < count; i++ )
{
nCurPos += widthsAbs[i] + extraWidth;
pWidths[i] = nCurPos;
-
- DoUpdateStatusText(i);
}
// The total width of the panes passed to Windows must be equal to the
wxLogLastError("StatusBar_SetParts");
}
+ // Now that all parts have been created, set their text.
+ for ( i = 0; i < count; i++ )
+ {
+ DoUpdateStatusText(i);
+ }
+
delete [] pWidths;
}