From 67d67884a1103de713a6d76b52524e94825ce0ce Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 8 Aug 2014 14:36:20 -0700 Subject: [PATCH] Allow toggling the toolbar in the menu --- Source/Core/DolphinWX/FrameTools.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 49f4cb5e3d..0115a9faac 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -1891,26 +1891,21 @@ void CFrame::OnToggleToolbar(wxCommandEvent& event) } void CFrame::DoToggleToolbar(bool _show) { - if (_show) + GetToolBar()->Show(_show); + + if (g_pCodeWindow) { - m_Mgr->GetPane("TBMain").Show(); - if (g_pCodeWindow) + if (_show) { - m_Mgr->GetPane("TBDebug").Show(); m_Mgr->GetPane("TBAui").Show(); } - m_Mgr->Update(); - } - else - { - m_Mgr->GetPane("TBMain").Hide(); - if (g_pCodeWindow) + else { - m_Mgr->GetPane("TBDebug").Hide(); m_Mgr->GetPane("TBAui").Hide(); } - m_Mgr->Update(); } + + m_Mgr->Update(); } // Enable and disable the status bar