remove explicit setting of Toggle flag for AutomationControls
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 25 Apr 2016 16:31:50 +0000 (12:31 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:41 +0000 (15:30 -0400)
Make it be based on the ParameterDescriptor, which indicates toggle status anyway

libs/ardour/automation_control.cc
libs/ardour/plugin_insert.cc
libs/ardour/route.cc
libs/ardour/track.cc

index d947a3599f31da1194ac7db36f9736f0ab421049..85b0e1fab584de9295f2af3ac809b8baf131bfcb 100644 (file)
@@ -55,6 +55,9 @@ AutomationControl::AutomationControl(ARDOUR::Session&                          s
        , _session(session)
        , _desc(desc)
 {
+       if (_desc.toggled) {
+               set_flags (Controllable::Toggle);
+       }
 }
 
 AutomationControl::~AutomationControl ()
index b0d4d2f9ac7ba3c49279afbe3bb17c10e411f221..688645eb94a65bf3171724970d7a1d87e966851e 100644 (file)
@@ -2607,10 +2607,6 @@ PluginInsert::PluginControl::PluginControl (PluginInsert*                     p,
                        list->set_interpolation(Evoral::ControlList::Discrete);
                }
        }
-
-       if (desc.toggled) {
-               set_flags(Controllable::Toggle);
-       }
 }
 
 /** @param val `user' value */
@@ -2680,10 +2676,6 @@ PluginInsert::PluginPropertyControl::PluginPropertyControl (PluginInsert*
                alist()->set_yrange (desc.lower, desc.upper);
                alist()->reset_default (desc.normal);
        }
-
-       if (desc.toggled) {
-               set_flags(Controllable::Toggle);
-       }
 }
 
 void
index 3e424a9603a63e1a25a98784fea41a1994a816ff..c36e501aefde8e1d9bf1c59add2658568ede0908 100644 (file)
@@ -145,12 +145,10 @@ Route::init ()
        add_control (_trim_control);
 
        _solo_control.reset (new SoloControl (_session, X_("solo"), *this, *this));
-       _solo_control->set_flags (Controllable::Flag (_solo_control->flags() | Controllable::Toggle));
        add_control (_solo_control);
        _solo_control->Changed.connect_same_thread (*this, boost::bind (&Route::solo_control_changed, this, _1, _2));
 
        _mute_control.reset (new MuteControl (_session, X_("mute"), *this));
-       _mute_control->set_flags (Controllable::Flag (_mute_control->flags() | Controllable::Toggle));
        add_control (_mute_control);
 
        _phase_control.reset (new PhaseControl (_session, X_("phase")));
index 43dc26122e7cb4148c7d1f52983ee32c360173f0..80169bf5a173661133510af7511cdf31fd3fb573 100644 (file)
@@ -66,7 +66,6 @@ Track::init ()
 
        _record_enable_control.reset (new RecordEnableControl (_session, X_("recenable"), *this));
        add_control (_record_enable_control);
-       _record_enable_control->set_flags (Controllable::Toggle);
 
        _record_safe_control.reset (new AutomationControl (_session, RecSafeAutomation, ParameterDescriptor (RecSafeAutomation),
                                                           boost::shared_ptr<AutomationList> (new AutomationList (Evoral::Parameter (RecSafeAutomation))),