remove useless code recently added to RouteGroup
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 21 May 2016 13:48:38 +0000 (09:48 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:44 +0000 (15:30 -0400)
When a slaved automation control is changed because of a Master changing
its own value, the slave notifies about the change with NoGroup as the
GroupControlDisposition. There is therefore no need to disable a RouteGroup's
enabled status for its ControlGroups - the changes initiated by any Master
will not propagate to the group (which is precisely what we intend)

libs/ardour/ardour/route_group.h
libs/ardour/route_group.cc

index 6fec1158c572e57a0a10cdc48f6562576fe249a9..b4c6393e7a5d0df0cb2eb278a9c0a3b1fb60fcdf 100644 (file)
@@ -163,10 +163,6 @@ class LIBARDOUR_API RouteGroup : public SessionObject
        PBD::Property<bool> _color;
        PBD::Property<bool> _monitoring;
 
-       bool pre_master_gain;
-       bool pre_master_solo;
-       bool pre_master_mute;
-
        boost::shared_ptr<ControlGroup> _solo_group;
        boost::shared_ptr<ControlGroup> _mute_group;
        boost::shared_ptr<ControlGroup> _rec_enable_group;
index a42f90a113cb0f3031b1a154c38d151e0b5fbc4e..ecf4790d5c1a4fb9b8b917002683602bf72afcd8 100644 (file)
@@ -295,10 +295,6 @@ RouteGroup::set_gain (bool yn)
        _gain = yn;
        _gain_group->set_active (yn);
 
-       if (routes->empty() || !routes->front()->slaved()) {
-               pre_master_gain = yn;
-       }
-
        send_change (PropertyChange (Properties::gain));
 }
 
@@ -311,10 +307,6 @@ RouteGroup::set_mute (bool yn)
        _mute = yn;
        _mute_group->set_active (yn);
 
-       if (routes->empty() || !routes->front()->slaved()) {
-               pre_master_mute = yn;
-       }
-
        send_change (PropertyChange (Properties::mute));
 }
 
@@ -327,10 +319,6 @@ RouteGroup::set_solo (bool yn)
        _solo = yn;
        _solo_group->set_active (yn);
 
-       if (routes->empty() || !routes->front()->slaved()) {
-               pre_master_solo = yn;
-       }
-
        send_change (PropertyChange (Properties::solo));
 }
 
@@ -568,32 +556,13 @@ RouteGroup::assign_master (boost::shared_ptr<VCA> master)
 
        boost::shared_ptr<Route> front = routes->front ();
 
-       if (!front) {
-               return;
-       }
-
        if (front->slaved_to (master)) {
                return;
        }
 
-       bool cancel_master_controls = false;
-
-       if (!front->slaved()) {
-               pre_master_gain = is_gain ();
-               pre_master_solo = is_solo ();
-               pre_master_mute = is_mute ();
-               cancel_master_controls = true;
-       }
-
        for (RouteList::iterator r = routes->begin(); r != routes->end(); ++r) {
                (*r)->assign (master);
        }
-
-       if (cancel_master_controls) {
-               set_gain (false);
-               set_solo (false);
-               set_mute (false);
-       }
 }
 
 void
@@ -605,10 +574,6 @@ RouteGroup::unassign_master (boost::shared_ptr<VCA> master)
 
        boost::shared_ptr<Route> front = routes->front ();
 
-       if (!front) {
-               return;
-       }
-
        if (!front->slaved_to (master)) {
                return;
        }
@@ -616,12 +581,6 @@ RouteGroup::unassign_master (boost::shared_ptr<VCA> master)
        for (RouteList::iterator r = routes->begin(); r != routes->end(); ++r) {
                (*r)->unassign (master);
        }
-
-       if (!front->slaved()) {
-               set_gain (pre_master_gain);
-               set_solo (pre_master_solo);
-               set_mute (pre_master_mute);
-       }
 }
 
 bool