diff --git a/include/wx/generic/statusbr.h b/include/wx/generic/statusbr.h index 4452f353ad..fe00d93e30 100644 --- a/include/wx/generic/statusbr.h +++ b/include/wx/generic/statusbr.h @@ -92,7 +92,6 @@ public: void SetBorderY(int y); void OnPaint(wxPaintEvent& event); - void OnSize(wxSizeEvent& event); void OnLeftDown(wxMouseEvent& event); void OnRightDown(wxMouseEvent& event); diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 6926a245ae..00588ff0f6 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -49,7 +49,6 @@ BEGIN_EVENT_TABLE(wxStatusBarGeneric, wxWindow) EVT_PAINT(wxStatusBarGeneric::OnPaint) - EVT_SIZE(wxStatusBarGeneric::OnSize) EVT_LEFT_DOWN(wxStatusBarGeneric::OnLeftDown) EVT_RIGHT_DOWN(wxStatusBarGeneric::OnRightDown) EVT_SYS_COLOUR_CHANGED(wxStatusBarGeneric::OnSysColourChanged) @@ -299,10 +298,8 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const GetClientSize(&width, &height); #endif - // we cache m_widthsAbs between calls normally but it's cleared when the - // status widths change so recompute it if needed and also if client width - // has changed to take into account the fact that derived OnSize is run - // before cache has been cleared in own OnSize + // we cache m_widthsAbs between calls and recompute it if client + // width has changed (or when it is initially empty) if ( m_widthsAbs.IsEmpty() || (m_lastClientWidth != width) ) { wxConstCast(this, wxStatusBarGeneric)-> @@ -383,14 +380,6 @@ void wxStatusBarGeneric::SetMinHeight(int height) } } -void wxStatusBarGeneric::OnSize(wxSizeEvent& event) -{ - // have to recompute the widths in pixels - m_widthsAbs.Empty(); - - event.Skip(); -} - void wxStatusBarGeneric::OnLeftDown(wxMouseEvent& event) { #ifdef __WXGTK20__