Fix restoring of wxAuiManager::m_has_maximized when restoring perspective.

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
This commit is contained in:
Vadim Zeitlin
2011-05-14 14:18:17 +00:00
parent 026c6eff70
commit 55908cf096

View 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())
{