diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index 25887d8160..212c8e9ade 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -72,18 +72,14 @@ AutomationController::~AutomationController() boost::shared_ptr AutomationController::create( - boost::shared_ptr parent, + boost::shared_ptr printer, const Evoral::Parameter& param, boost::shared_ptr ac) { - Gtk::Adjustment* adjustment = manage(new Gtk::Adjustment(param.normal(), param.min(), param.max())); - if (!ac) { - PBD::warning << "Creating AutomationController for " << EventTypeMap::instance().to_symbol(param) << endmsg; - ac = boost::dynamic_pointer_cast(parent->control_factory(param)); - } else { - assert(ac->parameter() == param); - } - return boost::shared_ptr(new AutomationController(parent, ac, adjustment)); + Gtk::Adjustment* adjustment = manage (new Gtk::Adjustment (param.normal(), param.min(), param.max())); + assert (ac); + assert(ac->parameter() == param); + return boost::shared_ptr(new AutomationController(printer, ac, adjustment)); } std::string diff --git a/gtk2_ardour/automation_controller.h b/gtk2_ardour/automation_controller.h index 7d925b6cd8..ad34abf1a9 100644 --- a/gtk2_ardour/automation_controller.h +++ b/gtk2_ardour/automation_controller.h @@ -54,7 +54,7 @@ public: void stop_updating (); private: - AutomationController (boost::shared_ptr parent, boost::shared_ptr ac, Gtk::Adjustment* adj); + AutomationController (boost::shared_ptr printer, boost::shared_ptr ac, Gtk::Adjustment* adj); std::string get_label (double&); void start_touch();