From dafa49256d2b43cde863ad44d17adc9d7bea5534 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 1 Sep 2001 21:47:49 +0000 Subject: [PATCH] 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 --- src/msw/statbr95.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.50.0