From 208f99c3e398e7ddf95016fff5e67883714fff54 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 Jun 2011 22:49:51 +0000 Subject: [PATCH] Update status bar fields widths from WM_SIZE handler. Doing it immediately after calling ::SetWindowPos(), as we used to do, didn't work correctly (presumably because the status bar fields widths were not updated yet internally) and resulted in not updating the ellipsized fields values when "Show window contents while dragging" Windows option was off. Doing it when we get WM_SIZE works in this case too. Closes #13257. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/statusbar.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/msw/statusbar.cpp b/src/msw/statusbar.cpp index 6f58f7cb00..e694abf247 100644 --- a/src/msw/statusbar.cpp +++ b/src/msw/statusbar.cpp @@ -502,9 +502,6 @@ void wxStatusBar::DoMoveWindow(int x, int y, int width, int height) ); } - // adjust fields widths to the new size - MSWUpdateFieldsWidths(); - // 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 @@ -595,15 +592,21 @@ wxStatusBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) } #endif - bool needsEllipsization = HasFlag(wxSTB_ELLIPSIZE_START) || - HasFlag(wxSTB_ELLIPSIZE_MIDDLE) || - HasFlag(wxSTB_ELLIPSIZE_END); - if ( nMsg == WM_SIZE && needsEllipsization ) + if ( nMsg == WM_SIZE ) { - for (int i=0; i