diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 4e9be4d02e..054862ce8a 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1536,9 +1536,9 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop /* mixer stuff */ - void route_listen_changed (bool leave_group_alone, boost::weak_ptr); + void route_listen_changed (bool group_override, boost::weak_ptr); void route_mute_changed (void *src); - void route_solo_changed (bool self_solo_change, bool leave_group_alone, boost::weak_ptr); + void route_solo_changed (bool self_solo_change, bool group_override, boost::weak_ptr); void route_solo_isolated_changed (void *src, boost::weak_ptr); void update_route_solo_state (boost::shared_ptr r = boost::shared_ptr()); diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index eb98a2388f..ca01b597c0 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -791,7 +791,7 @@ Route::set_listen (bool yn, void* src, bool group_override) } _mute_master->set_soloed_by_others (false); - listen_changed (src, group_active); /* EMIT SIGNAL */ + listen_changed (src, group_override); /* EMIT SIGNAL */ } } } @@ -870,7 +870,6 @@ Route::set_solo (bool yn, void *src, bool group_override) return; } - // explicit XOR bool group_active = _route_group && _route_group->is_active() && _route_group->is_solo(); if (group_override && _route_group) { group_active = !group_active; @@ -886,7 +885,7 @@ Route::set_solo (bool yn, void *src, bool group_override) if (self_soloed() != yn) { set_self_solo (yn); set_mute_master_solo (); - solo_changed (true, src, group_active); /* EMIT SIGNAL */ + solo_changed (true, src, group_override); /* EMIT SIGNAL */ _solo_control->Changed (); /* EMIT SIGNAL */ } diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index e22fe57c99..479b433f29 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3490,7 +3490,7 @@ Session::route_mute_changed (void* /*src*/) } void -Session::route_listen_changed (bool leave_group_alone, boost::weak_ptr wpr) +Session::route_listen_changed (bool group_override, boost::weak_ptr wpr) { boost::shared_ptr route = wpr.lock(); if (!route) { @@ -3503,12 +3503,16 @@ Session::route_listen_changed (bool leave_group_alone, boost::weak_ptr wp if (Config->get_exclusive_solo()) { /* new listen: disable all other listen, except solo-grouped channels */ RouteGroup* rg = route->route_group (); + bool leave_group_alone = (rg && rg->is_active() && rg->is_solo()); + if (group_override && rg) { + leave_group_alone = !leave_group_alone; + } boost::shared_ptr r = routes.reader (); for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner() || (leave_group_alone && ((*i)->route_group() == rg))) { continue; } - (*i)->set_listen (false, this); + (*i)->set_listen (false, this, group_override); } } @@ -3552,7 +3556,7 @@ Session::route_solo_isolated_changed (void* /*src*/, boost::weak_ptr wpr) } void -Session::route_solo_changed (bool self_solo_change, bool leave_group_alone, boost::weak_ptr wpr) +Session::route_solo_changed (bool self_solo_change, bool group_override, boost::weak_ptr wpr) { DEBUG_TRACE (DEBUG::Solo, string_compose ("route solo change, self = %1\n", self_solo_change)); @@ -3574,6 +3578,10 @@ Session::route_solo_changed (bool self_solo_change, bool leave_group_alone, boo } RouteGroup* rg = route->route_group (); + bool leave_group_alone = (rg && rg->is_active() && rg->is_solo()); + if (group_override && rg) { + leave_group_alone = !leave_group_alone; + } if (delta == 1 && Config->get_exclusive_solo()) { /* new solo: disable all other solos, but not the group if its solo-enabled */ @@ -3583,7 +3591,7 @@ Session::route_solo_changed (bool self_solo_change, bool leave_group_alone, boo (leave_group_alone && ((*i)->route_group() == rg))) { continue; } - (*i)->set_solo (false, this); + (*i)->set_solo (false, this, group_override); } }