Fix AUI appearance when a maximized pane becomes floating.
The other panes were not previously restored, resulting in bad appearance and behaviour. Do restore them now before making the previous maximized pane floating. Closes #14460. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -538,6 +538,7 @@ All (GUI):
|
||||
- Add possibility to hide and show again wxRibbonBar pages (wxBen).
|
||||
- Add expand/collapse button to wxRibbonBar (rakeshthp).
|
||||
- Fix item data access in wxDataViewListCtrl (Kry).
|
||||
- Fix problem with floating maximized AUI panes (Laurent Poujoulat).
|
||||
|
||||
wxGTK:
|
||||
|
||||
|
@@ -4793,7 +4793,7 @@ void wxAuiManager::OnPaneButton(wxAuiManagerEvent& evt)
|
||||
}
|
||||
else if (evt.button == wxAUI_BUTTON_MAXIMIZE_RESTORE && !pane.IsMaximized())
|
||||
{
|
||||
// fire pane close event
|
||||
// fire pane maximize event
|
||||
wxAuiManagerEvent e(wxEVT_AUI_PANE_MAXIMIZE);
|
||||
e.SetManager(this);
|
||||
e.SetPane(evt.pane);
|
||||
@@ -4807,7 +4807,7 @@ void wxAuiManager::OnPaneButton(wxAuiManagerEvent& evt)
|
||||
}
|
||||
else if (evt.button == wxAUI_BUTTON_MAXIMIZE_RESTORE && pane.IsMaximized())
|
||||
{
|
||||
// fire pane close event
|
||||
// fire pane restore event
|
||||
wxAuiManagerEvent e(wxEVT_AUI_PANE_RESTORE);
|
||||
e.SetManager(this);
|
||||
e.SetPane(evt.pane);
|
||||
@@ -4819,11 +4819,29 @@ void wxAuiManager::OnPaneButton(wxAuiManagerEvent& evt)
|
||||
Update();
|
||||
}
|
||||
}
|
||||
else if (evt.button == wxAUI_BUTTON_PIN)
|
||||
else if (evt.button == wxAUI_BUTTON_PIN &&
|
||||
(m_flags & wxAUI_MGR_ALLOW_FLOATING) && pane.IsFloatable())
|
||||
{
|
||||
if ((m_flags & wxAUI_MGR_ALLOW_FLOATING) &&
|
||||
pane.IsFloatable())
|
||||
pane.Float();
|
||||
if (pane.IsMaximized())
|
||||
{
|
||||
// If the pane is maximized, the original state must be restored
|
||||
// before trying to float the pane, otherwise the other panels
|
||||
// wouldn't appear correctly when it becomes floating.
|
||||
wxAuiManagerEvent e(wxEVT_AUI_PANE_RESTORE);
|
||||
e.SetManager(this);
|
||||
e.SetPane(evt.pane);
|
||||
ProcessMgrEvent(e);
|
||||
|
||||
if (e.GetVeto())
|
||||
{
|
||||
// If it can't be restored, it can't be floated neither.
|
||||
return;
|
||||
}
|
||||
|
||||
RestorePane(pane);
|
||||
}
|
||||
|
||||
pane.Float();
|
||||
Update();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user