From: Jaakko Salli Date: Sun, 5 Oct 2008 09:45:10 +0000 (+0000) Subject: Call RecreateControls() if relevant window style flag was toggled X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c3e57ac4ac9222d84ac208a493b57fb24e474a6a Call RecreateControls() if relevant window style flag was toggled git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 16c4f459d7..d6b17107cb 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -505,9 +505,18 @@ void wxPropertyGridManager::Thaw() void wxPropertyGridManager::SetWindowStyleFlag( long style ) { + int oldWindowStyle = GetWindowStyleFlag(); + wxWindow::SetWindowStyleFlag( style ); m_pPropGrid->SetWindowStyleFlag( (m_pPropGrid->GetWindowStyleFlag()&~(wxPG_MAN_PASS_FLAGS_MASK)) | (style&wxPG_MAN_PASS_FLAGS_MASK) ); + + // Need to re-position windows? + if ( (oldWindowStyle & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) != + (style & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) ) + { + RecreateControls(); + } } // -----------------------------------------------------------------------