From 99c0ef21d797bb4b3de5b5f0b2a9d204fc3b1132 Mon Sep 17 00:00:00 2001 From: Colin Fletcher Date: Fri, 16 May 2014 00:51:54 +0100 Subject: [PATCH] Ripple mode: ripple when deleting ranges. Make delete, cut and clear of a range ripple the appropriate playlists. --- gtk2_ardour/route_time_axis.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index fd8f7f5995..9cb26d1622 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -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 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 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 cmds; playlist->rdiff (cmds);