fix up logic that connects ControlGroups and RouteGroups
This makes deactivating a RouteGroup also stop the ControlGroups from having any effect
This commit is contained in:
parent
af9a9a9efd
commit
78ad42fd88
@ -155,6 +155,10 @@ ControlGroup::set_group_value (boost::shared_ptr<AutomationControl> control, dou
|
||||
|
||||
control->set_value (val, Controllable::ForGroup);
|
||||
|
||||
if (!_active) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* now propagate across the group */
|
||||
|
||||
Glib::Threads::RWLock::ReaderLock lm (controls_lock);
|
||||
@ -237,6 +241,10 @@ GainControlGroup::set_group_value (boost::shared_ptr<AutomationControl> control,
|
||||
|
||||
/* now propagate across the group */
|
||||
|
||||
if (!_active) {
|
||||
return;
|
||||
}
|
||||
|
||||
Glib::Threads::RWLock::ReaderLock lm (controls_lock);
|
||||
|
||||
if (_mode & Relative) {
|
||||
|
@ -395,6 +395,9 @@ RouteGroup::set_active (bool yn, void* /*src*/)
|
||||
}
|
||||
|
||||
_active = yn;
|
||||
|
||||
push_to_groups ();
|
||||
|
||||
send_change (PropertyChange (Properties::active));
|
||||
_session.set_dirty ();
|
||||
}
|
||||
@ -539,11 +542,19 @@ RouteGroup::post_set (PBD::PropertyChange const &)
|
||||
void
|
||||
RouteGroup::push_to_groups ()
|
||||
{
|
||||
_gain_group->set_active (_gain);
|
||||
_solo_group->set_active (_solo);
|
||||
_mute_group->set_active (_mute);
|
||||
_rec_enable_group->set_active (_recenable);
|
||||
_monitoring_group->set_active (_monitoring);
|
||||
if (_active) {
|
||||
_gain_group->set_active (is_gain());
|
||||
_solo_group->set_active (is_solo());
|
||||
_mute_group->set_active (is_mute());
|
||||
_rec_enable_group->set_active (is_recenable());
|
||||
_monitoring_group->set_active (is_monitoring());
|
||||
} else {
|
||||
_gain_group->set_active (false);
|
||||
_solo_group->set_active (false);
|
||||
_mute_group->set_active (false);
|
||||
_rec_enable_group->set_active (false);
|
||||
_monitoring_group->set_active (false);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user