diff options
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r-- | gtk2_ardour/automation_controller.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index 775c12f668..263761dcc5 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -63,13 +63,15 @@ AutomationController::~AutomationController() boost::shared_ptr<AutomationController> AutomationController::create( boost::shared_ptr<Automatable> parent, - boost::shared_ptr<Evoral::ControlList> cl, + const Evoral::Parameter& param, boost::shared_ptr<AutomationControl> ac) { - Gtk::Adjustment* adjustment = manage(new Gtk::Adjustment(cl->default_value(), cl->get_min_y(), cl->get_max_y())); + Gtk::Adjustment* adjustment = manage(new Gtk::Adjustment(param.normal(), param.min(), param.max())); if (!ac) { - PBD::warning << "Creating AutomationController for " << cl->parameter().symbol() << endmsg; - ac = boost::dynamic_pointer_cast<AutomationControl>(parent->control_factory(cl)); + PBD::warning << "Creating AutomationController for " << param.symbol() << endmsg; + ac = boost::dynamic_pointer_cast<AutomationControl>(parent->control_factory(param)); + } else { + assert(ac->parameter() == param); } return boost::shared_ptr<AutomationController>(new AutomationController(ac, adjustment)); } |