From 42647c99206bacdc2d5dd7b30ba98d788e7d7a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Mon, 28 Sep 2015 18:38:33 +0200 Subject: [PATCH] Introduce Ctrl+Shift+Click on lock solo in the mixer. --- gtk2_ardour/route_ui.cc | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 1a5bd073ce..216a3bd441 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -1452,9 +1452,38 @@ RouteUI::solo_isolate_button_release (GdkEventButton* ev) bool RouteUI::solo_safe_button_release (GdkEventButton* ev) { - if (ev->button == 1) { - _route->set_solo_safe (!solo_safe_led->active_state(), this); + if (ev->type == GDK_2BUTTON_PRESS || ev->type == GDK_3BUTTON_PRESS) { + return true; } + + bool view = solo_safe_led->active_state(); + bool model = _route->solo_safe(); + + if (ev->button == 1) { + if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) { + boost::shared_ptr rl (_session->get_routes()); + if (model) { + /* disable solo safe for all routes */ + DisplaySuspender ds; + for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { + (*i)->set_solo_safe (false, this); + } + } else { + /* enable solo safe for all routes */ + DisplaySuspender ds; + for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { + (*i)->set_solo_safe (true, this); + } + } + } + else { + if (model == view) { + /* flip just this route */ + _route->set_solo_safe (!view, this); + } + } + } + return false; }