diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-09-28 17:59:10 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-09-28 17:59:10 -0400 |
commit | 2c1350077ae901fdcc2aee4082d3c3a6aedfd822 (patch) | |
tree | bf50df947c907dedd560845f4dacb00aba8abac0 | |
parent | 1536228d00acb8aa076f1e1a0d80baea69e9b227 (diff) | |
parent | 42647c99206bacdc2d5dd7b30ba98d788e7d7a2e (diff) |
Merge branch 'chaot4-fix_lock_solo_ctrl_shift'
-rw-r--r-- | gtk2_ardour/route_ui.cc | 31 |
1 files changed, 30 insertions, 1 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->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) { - _route->set_solo_safe (!solo_safe_led->active_state(), this); + if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) { + boost::shared_ptr<RouteList> 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; } |