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:
parent
6e6b3d325b
commit
7628316335
@ -4618,11 +4618,24 @@ CrossfadeEdgeDrag::finished (GdkEvent*, bool)
|
|||||||
|
|
||||||
new_length = ar->verify_xfade_bounds (len + _editor->unit_to_frame (distance), start);
|
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) {
|
if (start) {
|
||||||
ar->set_fade_in_length (new_length);
|
ar->set_fade_in_length (new_length);
|
||||||
} else {
|
} else {
|
||||||
ar->set_fade_out_length (new_length);
|
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
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user