From cabd3783fec773f40740e4427c32808b40012d9b Mon Sep 17 00:00:00 2001 From: Colin Fletcher Date: Tue, 1 Jul 2014 18:27:22 +0100 Subject: [PATCH] Ripple mode: fix undo of paste Fix undo of region paste operations in ripple mode. --- gtk2_ardour/route_time_axis.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index ed46278aa6..ff898b7895 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -1434,13 +1434,18 @@ RouteTimeAxisView::paste (framepos_t pos, float times, Selection& selection, siz DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("modified paste to %1\n", pos)); } - pl->clear_changes (); + pl->clear_changes (); if (Config->get_edit_mode() == Ripple) { std::pair extent = (*p)->get_extent(); framecnt_t amount = extent.second - extent.first; pl->ripple(pos, amount * times, boost::shared_ptr()); } pl->paste (*p, pos, times); + + vector cmds; + pl->rdiff (cmds); + _session->add_commands (cmds); + _session->add_command (new StatefulDiffCommand (pl)); return true;