diff options
author | Hans Fugal <hans@fugal.net> | 2006-07-25 01:50:20 +0000 |
---|---|---|
committer | Hans Fugal <hans@fugal.net> | 2006-07-25 01:50:20 +0000 |
commit | b7bffbe7a249356a93d25a41f7c472cc9dd8f27f (patch) | |
tree | f4e2739586f55cca66834c32c63bb7027c46e920 /gtk2_ardour/redirect_automation_time_axis.cc | |
parent | 55159005b925396eeb41529f6e5b1d998fe63dc2 (diff) |
r191@gandalf: fugalh | 2006-07-24 19:50:10 -0600
All the obvious MementoCommand grunt work. Now there's some
add_undo/add_redo_no_execute sprinkled around where one is separated from the
other (e.g. in different callbacks) or perhaps even where there's only an undo
and no redo. Also some sigc-based undo/redo pairs that probably need their own
Command class.
git-svn-id: svn://localhost/ardour2/branches/undo@692 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/redirect_automation_time_axis.cc')
-rw-r--r-- | gtk2_ardour/redirect_automation_time_axis.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/redirect_automation_time_axis.cc b/gtk2_ardour/redirect_automation_time_axis.cc index e1b71310ac..d6e2432338 100644 --- a/gtk2_ardour/redirect_automation_time_axis.cc +++ b/gtk2_ardour/redirect_automation_time_axis.cc @@ -97,9 +97,11 @@ RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, lines.front()->view_to_model_y (y); _session.begin_reversible_command (description); - _session.add_undo (alist.get_memento()); + XMLNode &before, &after; + before = alist.get_state(); alist.add (when, y); - _session.add_redo_no_execute (alist.get_memento()); + after = alist.get_state(); + _session.add_command(MementoCommand<AutomationList>(alist, before, after)); _session.commit_reversible_command (); _session.set_dirty (); } |