implement undo/redo for xfade trimmin

git-svn-id: svn://localhost/ardour2/branches/3.0@12242 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-05-10 18:36:05 +00:00
parent 6e6b3d325b
commit 7628316335
1 changed files with 13 additions and 0 deletions

View File

@ -4618,11 +4618,24 @@ CrossfadeEdgeDrag::finished (GdkEvent*, bool)
new_length = ar->verify_xfade_bounds (len + _editor->unit_to_frame (distance), start);
_editor->begin_reversible_command ("xfade trim");
ar->playlist()->clear_owned_changes ();
if (start) {
ar->set_fade_in_length (new_length);
} else {
ar->set_fade_out_length (new_length);
}
/* Adjusting the xfade may affect other regions in the playlist, so we need
to get undo Commands from the whole playlist rather than just the
region.
*/
vector<Command*> cmds;
ar->playlist()->rdiff (cmds);
_editor->session()->add_commands (cmds);
}
void