]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for wxStatusBar wrongly reporting field rects inside EVT_SIZE handler
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 1 Sep 2001 21:47:49 +0000 (21:47 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 1 Sep 2001 21:47:49 +0000 (21:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/statbr95.cpp

index df3eacee72badff1c160c47284a32273ede4d1e2..6fc87c0d1c166192372676f8435b77a06d12b598 100644 (file)
@@ -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