Fix Controllable::InverseGroup behavior.
authorRobin Gareus <robin@gareus.org>
Sat, 11 Mar 2017 17:48:37 +0000 (18:48 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 11 Mar 2017 17:58:50 +0000 (18:58 +0100)
use_group(), use_me() filters group behavior beforehand.
ControlGroup::set_group_value() lacks context to make the decision itself
and should always apply to the group (regardless of active state):
InverseGroup allows to override both: inactive predicate and inactive group.

This needs testing, particularly since  RouteGroupMember::use_group()
is no longer used and was superseded by RouteGroup::push_to_groups()

libs/ardour/control_group.cc

index 5f65122a3d61d7ea7eba8df6f81c8a3f90c5d746..ea289506a6bfec405c983a11a193100f1b3f76a6 100644 (file)
@@ -171,10 +171,6 @@ 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);
@@ -256,12 +252,6 @@ GainControlGroup::get_max_factor (gain_t factor)
 void
 GainControlGroup::set_group_value (boost::shared_ptr<AutomationControl> control, double val)
 {
-       if (!_active) {
-               /* set the primary control */
-               control->set_value (val, Controllable::ForGroup);
-               return;
-       }
-
        Glib::Threads::RWLock::ReaderLock lm (controls_lock);
 
        if (_mode & Relative) {