summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-01-10 23:37:34 +0000
committerCarl Hetherington <carl@carlh.net>2011-01-10 23:37:34 +0000
commit648035dba9d6e0b9f98aefadf016cf7d1faa49ee (patch)
tree0e9a1175628a2a950561c18a8d0b77bbf0a359d2 /libs/ardour/route.cc
parentc482638aa6e0dbc0d4acdc93fe9712e1802fde32 (diff)
Add route group property to share route active state (#3703)
git-svn-id: svn://localhost/ardour2/branches/3.0@8497 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 25024b992a..71780870d1 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -1964,7 +1964,7 @@ Route::_set_state (const XMLNode& node, int version, bool /*call_base*/)
if ((prop = node.property (X_("active"))) != 0) {
bool yn = string_is_affirmative (prop->value());
_active = !yn; // force switch
- set_active (yn);
+ set_active (yn, this);
}
if ((prop = node.property (X_("meter-point"))) != 0) {
@@ -2210,7 +2210,7 @@ Route::_set_state_2X (const XMLNode& node, int version)
if ((prop = child->property (X_("active"))) != 0) {
bool yn = string_is_affirmative (prop->value());
_active = !yn; // force switch
- set_active (yn);
+ set_active (yn, this);
}
if ((prop = child->property (X_("gain"))) != 0) {
@@ -3399,8 +3399,13 @@ Route::denormal_protection () const
}
void
-Route::set_active (bool yn)
+Route::set_active (bool yn, void* src)
{
+ if (_route_group && src != _route_group && _route_group->is_active() && _route_group->is_route_active()) {
+ _route_group->foreach_route (boost::bind (&Route::set_active, _1, yn, _route_group));
+ return;
+ }
+
if (_active != yn) {
_active = yn;
_input->set_active (yn);