From: Václav Slavík Date: Sat, 1 Sep 2001 21:47:49 +0000 (+0000) Subject: fix for wxStatusBar wrongly reporting field rects inside EVT_SIZE handler X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dafa49256d2b43cde863ad44d17adc9d7bea5534?ds=inline fix for wxStatusBar wrongly reporting field rects inside EVT_SIZE handler git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp index df3eacee72..6fc87c0d1c 100644 --- a/src/msw/statbr95.cpp +++ b/src/msw/statbr95.cpp @@ -309,6 +309,16 @@ void wxStatusBar95::DoMoveWindow(int x, int y, int width, int height) // adjust fields widths to the new size SetFieldsWidth(); + + // we have to trigger wxSizeEvent if there are children window in status + // bar because GetFieldRect returned incorrect (not updated) values up to + // here, which almost certainly resulted in incorrectly redrawn statusbar + if ( m_children.GetCount() > 0 ) + { + wxSizeEvent event(GetClientSize(), m_windowId); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); + } } #endif // __WIN95__ && wxUSE_NATIVE_STATUSBAR