]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix restoring of wxAuiManager::m_has_maximized when restoring perspective.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 14 May 2011 14:18:17 +0000 (14:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 14 May 2011 14:18:17 +0000 (14:18 +0000)
If the perspective being loaded contains a maximized pane, set the
m_has_maximized flag to true. Otherwise the flag and the effective pane state
was out of sync resulting in several problems in the UI behaviour.

Closes #12527.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/framemanager.cpp

index 021cecd9a9e5858a42a492ec5d5801bd43565b17..b4b08093c7f783a1b440797a017211e34132949f 100644 (file)
@@ -1589,6 +1589,7 @@ bool wxAuiManager::LoadPerspective(const wxString& layout, bool update)
     input.Replace(wxT("\\|"), wxT("\a"));
     input.Replace(wxT("\\;"), wxT("\b"));
 
+    m_has_maximized = false;
     while (1)
     {
         wxAuiPaneInfo pane;
@@ -1631,6 +1632,9 @@ bool wxAuiManager::LoadPerspective(const wxString& layout, bool update)
 
         LoadPaneInfo(pane_part, pane);
 
+        if ( pane.IsMaximized() )
+            m_has_maximized = true;
+
         wxAuiPaneInfo& p = GetPane(pane.name);
         if (!p.IsOk())
         {