]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't dock undockable panes in wxAuiManager::LoadPerspective().
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 3 Nov 2010 16:29:30 +0000 (16:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 3 Nov 2010 16:29:30 +0000 (16:29 +0000)
All panes were docked when loading a perspective, including those that were
created to be non-dockable. Don't dock the latter ones now.

Closes #12648.

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

src/aui/framemanager.cpp

index f9b29c1f75abff27668295cdfcac0c8607196c7e..98234754636dd88c0dc33965070b8ffb75a4d3fb 100644 (file)
@@ -1570,10 +1570,15 @@ bool wxAuiManager::LoadPerspective(const wxString& layout, bool update)
     if (part != wxT("layout2"))
         return false;
 
-    // mark all panes currently managed as docked and hidden
+    // Mark all panes currently managed as hidden. Also, dock all panes that are dockable.
     int pane_i, pane_count = m_panes.GetCount();
     for (pane_i = 0; pane_i < pane_count; ++pane_i)
-        m_panes.Item(pane_i).Dock().Hide();
+    {
+        wxAuiPaneInfo& p = m_panes.Item(pane_i);
+        if(p.IsDockable())
+            p.Dock();
+        p.Hide();
+    }
 
     // clear out the dock array; this will be reconstructed
     m_docks.Clear();