Make it be based on the ParameterDescriptor, which indicates toggle status anyway
, _session(session)
, _desc(desc)
{
+ if (_desc.toggled) {
+ set_flags (Controllable::Toggle);
+ }
}
AutomationControl::~AutomationControl ()
list->set_interpolation(Evoral::ControlList::Discrete);
}
}
-
- if (desc.toggled) {
- set_flags(Controllable::Toggle);
- }
}
/** @param val `user' value */
alist()->set_yrange (desc.lower, desc.upper);
alist()->reset_default (desc.normal);
}
-
- if (desc.toggled) {
- set_flags(Controllable::Toggle);
- }
}
void
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")));
_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))),