Disable toolbar toggle in main window fullscreen

This commit is contained in:
archshift 2014-08-13 02:21:21 -07:00
parent b451f561ba
commit 7af80c7712
1 changed files with 8 additions and 0 deletions

View File

@ -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