}
void
-Strip::notify_dyn_change (AutomationType type, bool force_update)
+Strip::notify_dyn_change (AutomationType type, bool force_update, bool propagate_mode)
{
boost::shared_ptr<Route> r = _surface->mcp().subview_route();
}
boost::shared_ptr<AutomationControl> control;
+ bool reset_all = false;
switch (type) {
case CompThreshold:
break;
case CompMode:
control = r->comp_mode_controllable ();
+ reset_all = true;
break;
case CompMakeup:
control = r->comp_makeup_controllable ();
break;
}
+ if (propagate_mode && reset_all) {
+ _surface->subview_mode_changed ();
+ }
+
if (control) {
float val = control->get_value();
queue_parameter_display (type, val);
void
Strip::vselect_event (Button&, ButtonState bs)
{
- if (_surface->mcp().subview_mode() != None) {
+ if (_surface->mcp().subview_mode() != MackieControlProtocol::None) {
/* subview mode: vpot press acts like a button for toggle parameters */
break;
case MackieControlProtocol::EQ:
- setup_eq_vpot (r);
+ if (r) {
+ setup_eq_vpot (r);
+ } else {
+ /* leave it as it was */
+ }
break;
case MackieControlProtocol::Dynamics:
- setup_dyn_vpot (r);
+ if (r) {
+ setup_dyn_vpot (r);
+ } else {
+ /* leave it as it was */
+ }
break;
}
}
pc = available[pos];
param = params[pos];
- pc->Changed.connect (subview_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_dyn_change, this, param, false), ui_context());
+ pc->Changed.connect (subview_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_dyn_change, this, param, false, true), ui_context());
_vpot->set_control (pc);
string pot_id;
pot_id = "Thresh";
break;
case CompSpeed:
- pot_id = "Speed";
+ if (mc) {
+ pot_id = r->comp_speed_name (mc->get_value());
+ } else {
+ pot_id = "Speed";
+ }
break;
case CompMode:
pot_id = "Mode";
_surface->write (display (0, pot_id));
}
- notify_dyn_change (param, true);
+ notify_dyn_change (param, true, false);
}
void
void notify_eq_change (ARDOUR::AutomationType, uint32_t band, bool force);
void setup_eq_vpot (boost::shared_ptr<ARDOUR::Route>);
- void notify_dyn_change (ARDOUR::AutomationType, bool force);
+ void notify_dyn_change (ARDOUR::AutomationType, bool force, bool propagate_mode_change);
void setup_dyn_vpot (boost::shared_ptr<ARDOUR::Route>);
};