Ripple mode: ripple all after start of deleted range
authorColin Fletcher <colin.m.fletcher@googlemail.com>
Fri, 16 May 2014 19:04:57 +0000 (20:04 +0100)
committerColin Fletcher <colin.m.fletcher@googlemail.com>
Fri, 16 May 2014 19:04:57 +0000 (20:04 +0100)
When deleting a range in ripple mode, ripple everything after the start
point of that range backwards by the length of the range, so that
newly-created regions immediately at the range end move back to the range
start.

gtk2_ardour/route_time_axis.cc

index 9cb26d162235db8e139d2f3a841d0de2715745fd..ed46278aa6a72ec42effc9b93fc120616975ca00 100644 (file)
@@ -1364,7 +1364,7 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
        case Delete:
                if (playlist->cut (time) != 0) {
                        if (Config->get_edit_mode() == Ripple)
-                               playlist->ripple(time.start() + time.length(), -time.length(), NULL);
+                               playlist->ripple(time.start(), -time.length(), NULL);
                                // no need to exclude any regions from rippling here
 
                         vector<Command*> cmds;
@@ -1379,7 +1379,7 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
                if ((what_we_got = playlist->cut (time)) != 0) {
                        _editor.get_cut_buffer().add (what_we_got);
                        if (Config->get_edit_mode() == Ripple)
-                               playlist->ripple(time.start() + time.length(), -time.length(), NULL);
+                               playlist->ripple(time.start(), -time.length(), NULL);
                                // no need to exclude any regions from rippling here
 
                         vector<Command*> cmds;
@@ -1398,7 +1398,7 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
        case Clear:
                if ((what_we_got = playlist->cut (time)) != 0) {
                        if (Config->get_edit_mode() == Ripple)
-                               playlist->ripple(time.start() + time.length(), -time.length(), NULL);
+                               playlist->ripple(time.start(), -time.length(), NULL);
                                // no need to exclude any regions from rippling here
 
                         vector<Command*> cmds;