From c7237a606a70d29f57aaad1fa947f9ecae788dc9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 7 Aug 2017 16:29:08 +0200 Subject: [PATCH] Improve Track > Toggle Solo/Mute, include VCAs --- gtk2_ardour/editor_ops.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index f923b8a577..05118c2319 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -5934,18 +5934,18 @@ Editor::toggle_solo () boost::shared_ptr cl (new ControlList); for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) { - RouteTimeAxisView *rtav = dynamic_cast(*i); + StripableTimeAxisView *stav = dynamic_cast(*i); - if (!rtav) { + if (!stav || !stav->stripable()->solo_control()) { continue; } if (first) { - new_state = !rtav->route()->soloed (); + new_state = !stav->stripable()->solo_control()->soloed (); first = false; } - cl->push_back (rtav->route()->solo_control()); + cl->push_back (stav->stripable()->solo_control()); } _session->set_controls (cl, new_state ? 1.0 : 0.0, Controllable::UseGroup); @@ -5956,24 +5956,24 @@ Editor::toggle_mute () { bool new_state = false; bool first = true; - boost::shared_ptr rl (new RouteList); + StripableList sl; for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) { - RouteTimeAxisView *rtav = dynamic_cast(*i); + StripableTimeAxisView *stav = dynamic_cast(*i); - if (!rtav) { + if (!stav || !stav->stripable()->mute_control()) { continue; } if (first) { - new_state = !rtav->route()->muted(); + new_state = !stav->stripable()->mute_control()->muted(); first = false; } - rl->push_back (rtav->route()); + sl.push_back (stav->stripable()); } - _session->set_controls (route_list_to_control_list (rl, &Stripable::mute_control), new_state, Controllable::UseGroup); + _session->set_controls (stripable_list_to_control_list (sl, &Stripable::mute_control), new_state, Controllable::UseGroup); } void