diff options
author | David Robillard <d@drobilla.net> | 2007-07-06 02:37:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-06 02:37:35 +0000 |
commit | b942d3613e9679a1ffc5ad5ff0a6491cac1fa853 (patch) | |
tree | c6df327c7e2a34425c54e16ae02032affceeaae0 /gtk2_ardour | |
parent | 19273e824d40534a4e31259fb8b83122b24aa4e9 (diff) |
Fix 'live' CC sending of bar controllers after loading session (previously only worked when immediately created by user).
git-svn-id: svn://localhost/ardour2/trunk@2116 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/automation_controller.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/automation_controller.h | 3 | ||||
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/ladspa_pluginui.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 2 |
5 files changed, 7 insertions, 6 deletions
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index 09d1f1e744..8483bab393 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -61,12 +61,12 @@ AutomationController::~AutomationController() } boost::shared_ptr<AutomationController> -AutomationController::create(Session& s, boost::shared_ptr<AutomationList> al, boost::shared_ptr<AutomationControl> ac) +AutomationController::create(boost::shared_ptr<Automatable> parent, boost::shared_ptr<AutomationList> al, boost::shared_ptr<AutomationControl> ac) { Gtk::Adjustment* adjustment = manage(new Gtk::Adjustment(al->default_value(), al->get_min_y(), al->get_max_y())); if (!ac) { PBD::warning << "Creating AutomationController for " << al->parameter().to_string() << endmsg; - ac = boost::shared_ptr<AutomationControl>(new AutomationControl(s, al)); + ac = parent->control_factory(al); } return boost::shared_ptr<AutomationController>(new AutomationController(ac, adjustment)); } diff --git a/gtk2_ardour/automation_controller.h b/gtk2_ardour/automation_controller.h index 0f98e5f083..8a244113c4 100644 --- a/gtk2_ardour/automation_controller.h +++ b/gtk2_ardour/automation_controller.h @@ -29,13 +29,14 @@ namespace ARDOUR { class Session; class AutomationList; class AutomationControl; + class Automatable; } class AutomationController : public Gtkmm2ext::BarController { public: static boost::shared_ptr<AutomationController> create( - ARDOUR::Session& s, + boost::shared_ptr<ARDOUR::Automatable> parent, boost::shared_ptr<ARDOUR::AutomationList> al, boost::shared_ptr<ARDOUR::AutomationControl> ac); diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 28d8ba326f..5c5cd53dec 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -59,7 +59,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro _route (r), _control (c), _automatable (a), - _controller(AutomationController::create(s, c->list(), c)), + _controller(AutomationController::create(a, c->list(), c)), _base_rect (0), _name (nom), height_button (_("h")), diff --git a/gtk2_ardour/ladspa_pluginui.cc b/gtk2_ardour/ladspa_pluginui.cc index ffab3c18f9..7abee4fe23 100644 --- a/gtk2_ardour/ladspa_pluginui.cc +++ b/gtk2_ardour/ladspa_pluginui.cc @@ -456,7 +456,7 @@ LadspaPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automati } else { //sigc::slot<void,char*,uint32_t> pslot = sigc::bind (mem_fun(*this, &LadspaPluginUI::print_parameter), (uint32_t) port_index); - control_ui->controller = AutomationController::create(insert->session(), mcontrol->list(), mcontrol); + control_ui->controller = AutomationController::create(insert, mcontrol->list(), mcontrol); control_ui->controller->set_size_request (200, req.height); control_ui->controller->set_name (X_("PluginSlider")); control_ui->controller->set_style (BarController::LeftToRight); diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 7f43d3b638..a843659cbc 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -199,7 +199,7 @@ MidiTimeAxisView::create_automation_child (Parameter param, bool show) if (!c) { boost::shared_ptr<AutomationList> al(new ARDOUR::AutomationList(param, 0, 127, 64)); - c = boost::shared_ptr<AutomationControl>(new MidiTrack::MidiControl(midi_track(), al)); + c = boost::shared_ptr<AutomationControl>(_route->control_factory(al)); _route->add_control(c); } |