fix align_selection_relative() to use regions once only, and in the correct order
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 6 Feb 2008 03:00:34 +0000 (03:00 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 6 Feb 2008 03:00:34 +0000 (03:00 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3016 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_ops.cc

index 9dbe211f8cfc756fdbbdb7df774302db8e34c714..5c3a1590becd61132fc4805d06d05be3026a3e5e 100644 (file)
@@ -3164,10 +3164,9 @@ Editor::align_selection_relative (RegionPoint point, nframes_t position, const R
 
        /* move rest by the same amount */
        
-       RegionSelection::const_iterator i = rs.begin();
-       ++i;
-
-       for (; i != rs.end(); ++i) {
+       sorted.pop_front();
+       
+       for (list<RegionView*>::iterator i = sorted.begin(); i != sorted.end(); ++i) {
 
                boost::shared_ptr<Region> region ((*i)->region());