From df9654b8ccc0dcd1972fc6d130de72e0f5ad60c1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 26 Jun 2009 19:44:32 +0000 Subject: [PATCH] Fix up automation-follows-regions git-svn-id: svn://localhost/ardour2/branches/3.0@5286 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/diskstream.cc | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc index 27c6bb260c..b9638674eb 100644 --- a/libs/ardour/diskstream.cc +++ b/libs/ardour/diskstream.cc @@ -426,23 +426,16 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove > const & if (!_route || Config->get_automation_follows_regions () == false) { return; } - + list< Evoral::RangeMove > movements; + for (list< Evoral::RangeMove >::const_iterator i = movements_frames.begin(); - i != movements_frames.end(); ++i) { + i != movements_frames.end(); + ++i) { + movements.push_back(Evoral::RangeMove(i->from, i->length, i->to)); } - /* move gain automation */ - boost::shared_ptr gain_alist = _route->gain_control()->alist(); - XMLNode & before = gain_alist->get_state (); - gain_alist->move_ranges (movements); - _session.add_command ( - new MementoCommand ( - *gain_alist.get(), &before, &gain_alist->get_state () - ) - ); - /* move panner automation */ boost::shared_ptr p = _route->main_outs()->panner (); if (p) { @@ -451,13 +444,11 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove > const & XMLNode & before = pan_alist->get_state (); pan_alist->move_ranges (movements); _session.add_command (new MementoCommand ( - *pan_alist.get(), &before, &pan_alist->get_state ())); + *pan_alist.get(), &before, &pan_alist->get_state ())); } } /* move processor automation */ - /* XXX: ewww */ - _route->foreach_processor (sigc::bind (sigc::mem_fun (*this, &Diskstream::move_processor_automation), movements_frames)); }