diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-04-25 12:31:50 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:41 -0400 |
commit | eee3837245f570d36e5d4d92409660c8ff777b5b (patch) | |
tree | 27e4459babc78bde02c41fca664acb385de8b89a /libs/ardour | |
parent | 52b150ba5dda50e52a5e1bfa0aeb900defce3d54 (diff) |
remove explicit setting of Toggle flag for AutomationControls
Make it be based on the ParameterDescriptor, which indicates toggle status anyway
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/automation_control.cc | 3 | ||||
-rw-r--r-- | libs/ardour/plugin_insert.cc | 8 | ||||
-rw-r--r-- | libs/ardour/route.cc | 2 | ||||
-rw-r--r-- | libs/ardour/track.cc | 1 |
4 files changed, 3 insertions, 11 deletions
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index d947a3599f..85b0e1fab5 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -55,6 +55,9 @@ AutomationControl::AutomationControl(ARDOUR::Session& s , _session(session) , _desc(desc) { + if (_desc.toggled) { + set_flags (Controllable::Toggle); + } } AutomationControl::~AutomationControl () diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index b0d4d2f9ac..688645eb94 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -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 diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 3e424a9603..c36e501aef 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -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"))); diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index 43dc26122e..80169bf5a1 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -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))), |