]> git.saurik.com Git - wxWidgets.git/commitdiff
Call RecreateControls() if relevant window style flag was toggled
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 5 Oct 2008 09:45:10 +0000 (09:45 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 5 Oct 2008 09:45:10 +0000 (09:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/manager.cpp

index 16c4f459d7268b5770b6833c8812166584e69dff..d6b17107cba34dcc73a893fccd833dba31008ad3 100644 (file)
@@ -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();
+    }
 }
 
 // -----------------------------------------------------------------------