Update the field widths on demand in wxStatusBarGeneric.
This ensures that the value returned from GetFieldRect() is always up to date, even when this method is called from the user-defined wxEVT_SIZE handler, i.e. before our own OnSize() could run. Also remove the now unneeded hack with calling the base class OnSize() from the statbar sample. Closes #14268. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -947,11 +947,6 @@ void MyStatusBar::OnSize(wxSizeEvent& event)
|
||||
return;
|
||||
#endif
|
||||
|
||||
// TEMPORARY HACK: TODO find a more general solution
|
||||
#ifdef wxStatusBarGeneric
|
||||
wxStatusBar::OnSize(event);
|
||||
#endif
|
||||
|
||||
wxRect rect;
|
||||
if (!GetFieldRect(Field_Checkbox, rect))
|
||||
{
|
||||
|
Reference in New Issue
Block a user