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
This commit is contained in:
Paul Davis 2011-12-07 15:48:24 +00:00
parent 81b5814098
commit 186283a3c4
2 changed files with 7 additions and 1 deletions

View 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()) {

View 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);