fix, or at least improve, management of the editor toolbar when maximising editing...
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 7 Dec 2011 15:48:24 +0000 (15:48 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 7 Dec 2011 15:48:24 +0000 (15:48 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10936 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour_ui_options.cc
gtk2_ardour/editor.cc

index 7fab6e56913165d586dbd90af1ea26f12444b8bc..27750eeb4384f62b33fc3ff72a2769f64f97ea89 100644 (file)
@@ -279,6 +279,7 @@ void
 ARDOUR_UI::toggle_editing_space()
 {
        Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalEditor");
+
        if (act) {
                Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
                if (tact->get_active()) {
index 31d5b495fecf6ea1053a127cfa061de0a085d29d..e98a63b6a038d39c2f2fe87d66a594f0a22d27e9 100644 (file)
@@ -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);