mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Ripple mode: fix undo of paste
Fix undo of region paste operations in ripple mode.
This commit is contained in:
parent
83ae6beca5
commit
cabd3783fe
1 changed files with 6 additions and 1 deletions
|
|
@ -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));
|
DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("modified paste to %1\n", pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
pl->clear_changes ();
|
pl->clear_changes ();
|
||||||
if (Config->get_edit_mode() == Ripple) {
|
if (Config->get_edit_mode() == Ripple) {
|
||||||
std::pair<framepos_t, framepos_t> extent = (*p)->get_extent();
|
std::pair<framepos_t, framepos_t> extent = (*p)->get_extent();
|
||||||
framecnt_t amount = extent.second - extent.first;
|
framecnt_t amount = extent.second - extent.first;
|
||||||
pl->ripple(pos, amount * times, boost::shared_ptr<Region>());
|
pl->ripple(pos, amount * times, boost::shared_ptr<Region>());
|
||||||
}
|
}
|
||||||
pl->paste (*p, pos, times);
|
pl->paste (*p, pos, times);
|
||||||
|
|
||||||
|
vector<Command*> cmds;
|
||||||
|
pl->rdiff (cmds);
|
||||||
|
_session->add_commands (cmds);
|
||||||
|
|
||||||
_session->add_command (new StatefulDiffCommand (pl));
|
_session->add_command (new StatefulDiffCommand (pl));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue