diff options
author | Carl Hetherington <carl@carlh.net> | 2009-06-26 19:44:32 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-06-26 19:44:32 +0000 |
commit | df9654b8ccc0dcd1972fc6d130de72e0f5ad60c1 (patch) | |
tree | 6f0951ab7a0badbb833b7c3201d4b2b2843ca191 /libs/ardour/diskstream.cc | |
parent | 12949b390b63940e053a597c16ab4885b6be0dc7 (diff) |
Fix up automation-follows-regions
git-svn-id: svn://localhost/ardour2/branches/3.0@5286 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/diskstream.cc')
-rw-r--r-- | libs/ardour/diskstream.cc | 21 |
1 files 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<nframes_t> > const & if (!_route || Config->get_automation_follows_regions () == false) { return; } - + list< Evoral::RangeMove<double> > movements; + for (list< Evoral::RangeMove<nframes_t> >::const_iterator i = movements_frames.begin(); - i != movements_frames.end(); ++i) { + i != movements_frames.end(); + ++i) { + movements.push_back(Evoral::RangeMove<double>(i->from, i->length, i->to)); } - /* move gain automation */ - boost::shared_ptr<AutomationList> gain_alist = _route->gain_control()->alist(); - XMLNode & before = gain_alist->get_state (); - gain_alist->move_ranges (movements); - _session.add_command ( - new MementoCommand<AutomationList> ( - *gain_alist.get(), &before, &gain_alist->get_state () - ) - ); - /* move panner automation */ boost::shared_ptr<Panner> p = _route->main_outs()->panner (); if (p) { @@ -451,13 +444,11 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove<nframes_t> > const & XMLNode & before = pan_alist->get_state (); pan_alist->move_ranges (movements); _session.add_command (new MementoCommand<AutomationList> ( - *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)); } |