Ripple mode: ripple when deleting ranges.
authorColin Fletcher <colin.m.fletcher@googlemail.com>
Thu, 15 May 2014 23:51:54 +0000 (00:51 +0100)
committerColin Fletcher <colin.m.fletcher@googlemail.com>
Fri, 16 May 2014 00:03:37 +0000 (01:03 +0100)
Make delete, cut and clear of a range ripple the appropriate playlists.

gtk2_ardour/route_time_axis.cc

index fd8f7f5995f5b61428ee226d3775e9f31eac1687..9cb26d162235db8e139d2f3a841d0de2715745fd 100644 (file)
@@ -1363,6 +1363,10 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
        switch (op) {
        case Delete:
                if (playlist->cut (time) != 0) {
+                       if (Config->get_edit_mode() == Ripple)
+                               playlist->ripple(time.start() + time.length(), -time.length(), NULL);
+                               // no need to exclude any regions from rippling here
+
                         vector<Command*> cmds;
                         playlist->rdiff (cmds);
                         _session->add_commands (cmds);
@@ -1374,6 +1378,10 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
        case Cut:
                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);
+                               // no need to exclude any regions from rippling here
+
                         vector<Command*> cmds;
                         playlist->rdiff (cmds);
                         _session->add_commands (cmds);
@@ -1389,6 +1397,9 @@ 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);
+                               // no need to exclude any regions from rippling here
 
                         vector<Command*> cmds;
                         playlist->rdiff (cmds);