summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_controller.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-09-21 16:17:02 +0000
committerDavid Robillard <d@drobilla.net>2008-09-21 16:17:02 +0000
commite14187aadd574d46c82d8eb0d151b526b84ddcc7 (patch)
treea80073703c5c3f4a68b4d50aee2c14be7cc1e204 /gtk2_ardour/automation_controller.cc
parenteec19ca7afde0da57b2a4d9abc6ef847e6924975 (diff)
Display recorded controller data (fix show all/existing automation).
git-svn-id: svn://localhost/ardour2/branches/3.0@3779 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r--gtk2_ardour/automation_controller.cc10
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));
}