From ef0b9a740996c432a6a96180814d4f8d0ee16842 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 30 Jun 2007 22:08:39 +0000 Subject: Pan automation work. Almost, but not quite, working. git-svn-id: svn://localhost/ardour2/trunk@2093 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_time_axis.cc | 11 ++++++++--- 1 file changed, 8 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 53c1a84848..d032aaca9f 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -317,10 +317,12 @@ AudioTimeAxisView::update_pans () /* This is a filthy kludge until the panner stuff gets up to speed. */ /* Remove all our old automation tracks. Slowly. */ - while (true) { + /*while (true) { bool found = false; for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) { if (i->first.type() == PanAutomation) { + remove_child(i->second->track); + delete i->second; _automation_tracks.erase(i); found = true; break; @@ -329,9 +331,10 @@ AudioTimeAxisView::update_pans () if ( ! found) break; - } + }*/ /* Man I hate that damn stereo->stereo panner */ + uint32_t i = 0; for (p = _route->panner().begin(); p != _route->panner().end(); ++p) { boost::shared_ptr pan_track(new AutomationTimeAxisView (_session, _route, _route/*FIXME*/, (*p)->pan_control(), @@ -339,7 +342,9 @@ AudioTimeAxisView::update_pans () *this, parent_canvas, _route->describe_parameter((*p)->pan_control()->list()->param_id()), - (*p)->pan_control()->list()->param_id().to_string() /* FIXME: correct state name? */)); + ParamID(PanAutomation, i).to_string()/* FIXME: correct state name? */)); + add_automation_child(ParamID(PanAutomation, i), pan_track); + ++i; } } -- cgit v1.2.3