summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-05-04 00:42:07 +0200
committerRobin Gareus <robin@gareus.org>2017-05-04 00:42:07 +0200
commita23ac120f2fda027cd37df522ec0b8db9a57f733 (patch)
tree19d8319846d06a8ea44e998e83c0e0caa7007a2b /gtk2_ardour/route_ui.cc
parent2f37885e4bf19a6da4971d5a32e5169cf6fffc3e (diff)
The return of explicit exclusive solo.
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r--gtk2_ardour/route_ui.cc31
1 files changed, 26 insertions, 5 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index c8c48f257e..1a807967b0 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -629,14 +629,21 @@ RouteUI::solo_press(GdkEventButton* ev)
} else if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::SecondaryModifier))) {
- // Primary-Secondary-click: exclusively solo this track
+ /* Primary-Secondary-click: exclusively solo this track */
if (_solo_release) {
_solo_release->exclusive = true;
- boost::shared_ptr<RouteList> routes = _session->get_routes();
+ _solo_release->routes_on.reset (new RouteList);
+ _solo_release->routes_off.reset (new RouteList);
- for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
+ boost::shared_ptr<RouteList> routes = _session->get_routes();
+ for (RouteList::const_iterator i = routes->begin(); i != routes->end(); ++i) {
+#ifdef MIXBUS
+ if ((0 == _route->mixbus()) != (0 == (*i)->mixbus ())) {
+ continue;
+ }
+#endif
if ((*i)->soloed ()) {
_solo_release->routes_on->push_back (*i);
} else {
@@ -645,6 +652,20 @@ RouteUI::solo_press(GdkEventButton* ev)
}
}
+ boost::shared_ptr<RouteList> rl (new RouteList);
+ boost::shared_ptr<RouteList> routes = _session->get_routes();
+ for (RouteList::const_iterator i = routes->begin(); i != routes->end(); ++i) {
+#ifdef MIXBUS
+ if ((0 == _route->mixbus()) != (0 == (*i)->mixbus ())) {
+ continue;
+ }
+#endif
+ if ((*i)->soloed ()) {
+ rl->push_back (*i);
+ }
+ }
+ _session->set_controls (route_list_to_control_list (rl, &Stripable::solo_control), false, Controllable::UseGroup);
+
if (Config->get_solo_control_is_listen_control()) {
/* ??? we need a just_one_listen() method */
} else {
@@ -723,9 +744,9 @@ bool
RouteUI::solo_release (GdkEventButton* /*ev*/)
{
if (_solo_release) {
-
if (_solo_release->exclusive) {
-
+ _session->set_controls (route_list_to_control_list (_solo_release->routes_off, &Stripable::solo_control), 0.0, Controllable::NoGroup);
+ _session->set_controls (route_list_to_control_list (_solo_release->routes_on, &Stripable::solo_control), 1.0, Controllable::NoGroup);
} else {
_session->set_controls (route_list_to_control_list (_solo_release->routes, &Stripable::solo_control), _solo_release->active ? 1.0 : 0.0, Controllable::UseGroup);
}