Disable toolbar toggle in main window fullscreen
This commit is contained in:
parent
b451f561ba
commit
7af80c7712
|
@ -1242,15 +1242,23 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
|
||||||
// Save the current mode before going to fullscreen
|
// Save the current mode before going to fullscreen
|
||||||
AuiCurrent = m_Mgr->SavePerspective();
|
AuiCurrent = m_Mgr->SavePerspective();
|
||||||
m_Mgr->LoadPerspective(AuiFullscreen, true);
|
m_Mgr->LoadPerspective(AuiFullscreen, true);
|
||||||
|
|
||||||
// Hide toolbar
|
// Hide toolbar
|
||||||
DoToggleToolbar(false);
|
DoToggleToolbar(false);
|
||||||
|
|
||||||
|
// Disable toggling toolbar in menu
|
||||||
|
GetMenuBar()->FindItem(IDM_TOGGLE_TOOLBAR)->Enable(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Restore saved perspective
|
// Restore saved perspective
|
||||||
m_Mgr->LoadPerspective(AuiCurrent, true);
|
m_Mgr->LoadPerspective(AuiCurrent, true);
|
||||||
|
|
||||||
// Restore toolbar to the status it was at before going fullscreen.
|
// Restore toolbar to the status it was at before going fullscreen.
|
||||||
DoToggleToolbar(SConfig::GetInstance().m_InterfaceToolbar);
|
DoToggleToolbar(SConfig::GetInstance().m_InterfaceToolbar);
|
||||||
|
|
||||||
|
// Re-enable toggling toolbar in menu
|
||||||
|
GetMenuBar()->FindItem(IDM_TOGGLE_TOOLBAR)->Enable(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue