diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-10 18:36:05 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-10 18:36:05 +0000 |
commit | 762831633532afb117892741c5f4ab3129a97c1e (patch) | |
tree | fc11ddd17774498e15c21ae1387c7a6821b616ea /gtk2_ardour | |
parent | 6e6b3d325bffe5b654f94cb3ef91c829786bc7a5 (diff) |
implement undo/redo for xfade trimmin
git-svn-id: svn://localhost/ardour2/branches/3.0@12242 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index e9ab0d3a60..97590be1a9 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -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 |