diff options
author | Hans Fugal <hans@fugal.net> | 2006-07-26 23:28:54 +0000 |
---|---|---|
committer | Hans Fugal <hans@fugal.net> | 2006-07-26 23:28:54 +0000 |
commit | 8e301e875aacc4b7d37f6ed552e460511dafb7f2 (patch) | |
tree | 702f85ec8edf8a97a4509b6351e52650bd803504 /gtk2_ardour/automation_line.cc | |
parent | b7bffbe7a249356a93d25a41f7c472cc9dd8f27f (diff) |
r199@gandalf: fugalh | 2006-07-26 17:22:38 -0600
Memento(Redo|Undo)Command has a noop for the undo or redo respectively, and
we don't need both before and after state. This is primarily useful for
drag start/finish callbacks, and really only makes sense where wrapped by
(begin|commit)_reversible_command (a composite command).
Also a few more "normal" MementoCommands.
git-svn-id: svn://localhost/ardour2/branches/undo@695 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r-- | gtk2_ardour/automation_line.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index f5b23f01ae..bd7ed326d8 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -887,7 +887,7 @@ AutomationLine::start_drag (ControlPoint* cp, float fraction) } trackview.editor.current_session()->begin_reversible_command (str); - trackview.editor.current_session()->add_undo (get_memento()); + trackview.editor.current_session()->add_command (MementoUndoCommand<AutomationLine>(*this, get_state())); first_drag_fraction = fraction; last_drag_fraction = fraction; @@ -936,7 +936,7 @@ AutomationLine::end_drag (ControlPoint* cp) update_pending = false; - trackview.editor.current_session()->add_redo_no_execute (get_memento()); + trackview.editor.current_session()->add_command (MementoRedoCommand<AutomationLine>(*this, get_state())); trackview.editor.current_session()->commit_reversible_command (); trackview.editor.current_session()->set_dirty (); } @@ -1226,7 +1226,6 @@ AutomationLine::clear () { /* parent must create command */ XMLNode &before = get_state(); - trackview.editor.current_session()->add_undo (get_memento()); alist.clear(); trackview.editor.current_session()->add_command (MementoCommand<AutomationLine>(*this, before, get_state())); trackview.editor.current_session()->commit_reversible_command (); |