From 186283a3c484a71ad61d4e0db13efea6f1d9280c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 7 Dec 2011 15:48:24 +0000 Subject: [PATCH] fix, or at least improve, management of the editor toolbar when maximising editing space git-svn-id: svn://localhost/ardour2/branches/3.0@10936 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui_options.cc | 1 + gtk2_ardour/editor.cc | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 7fab6e5691..27750eeb43 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -279,6 +279,7 @@ void ARDOUR_UI::toggle_editing_space() { Glib::RefPtr act = ActionManager::get_action ("Common", "ToggleMaximalEditor"); + if (act) { Glib::RefPtr tact = Glib::RefPtr::cast_dynamic(act); if (tact->get_active()) { diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 31d5b495fe..e98a63b6a0 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -3558,7 +3558,9 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which) void Editor::detach_tearoff (Box* /*b*/, Window* /*w*/) { - if (_tools_tearoff->torn_off() && _mouse_mode_tearoff->torn_off()) { + if ((_tools_tearoff->torn_off() || !_tools_tearoff->visible()) && + (_mouse_mode_tearoff->torn_off() || !_mouse_mode_tearoff->visible()) && + (_zoom_tearoff->torn_off() || !_zoom_tearoff->visible())) { top_hbox.remove (toolbar_frame); } } @@ -3897,6 +3899,9 @@ Editor::session_state_saved (string) void Editor::maximise_editing_space () { + /* these calls will leave each tearoff visible *if* it is torn off + */ + _mouse_mode_tearoff->set_visible (false); _tools_tearoff->set_visible (false); _zoom_tearoff->set_visible (false);