From 24ccaac67e9d416b3f3c564a441934313f3e9a21 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 29 Jun 2007 04:02:58 +0000 Subject: Further automation refactoring - bring in the concept of Controllable, work towards making automation + GUI + play/write/touch generic and easily reusable. Added bar controller to automation track controls (mostly relevant for MIDI CC, but added for gain and pan too Just Because). Fixed glaring "redirect" list errors. Fix plugin controls/automation loading. git-svn-id: svn://localhost/ardour2/trunk@2080 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_time_axis.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gtk2_ardour/audio_time_axis.cc') diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 416a86c1a5..3d62915171 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -284,18 +284,25 @@ void AudioTimeAxisView::create_automation_child (ParamID param) { if (param.type() == GainAutomation) { + + boost::shared_ptr c = _route->gain_control(); + if (!c) { + error << "Route has no gain automation, unable to add automation track view." << endmsg; + return; + } + GainAutomationTimeAxisView* gain_track = new GainAutomationTimeAxisView (_session, _route, editor, *this, parent_canvas, _route->describe_parameter(param), - _route->gain_automation()); + c); AutomationLine* line = new AutomationGainLine ("automation gain", *gain_track, *gain_track->canvas_display, - _route->gain_automation()); + c->list()); line->set_line_color (Config->canvasvar_AutomationLine.get()); @@ -304,7 +311,7 @@ AudioTimeAxisView::create_automation_child (ParamID param) add_automation_child(ParamID(GainAutomation), gain_track); } else if (param.type() == PanAutomation) { - + PanAutomationTimeAxisView* pan_track = new PanAutomationTimeAxisView (_session, _route, editor, -- cgit v1.2.3