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
This commit is contained in:
Hans Fugal 2006-07-25 01:50:20 +00:00
parent 55159005b9
commit b7bffbe7a2
16 changed files with 191 additions and 125 deletions

View file

@ -78,9 +78,11 @@ PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEv
AutomationList& alist (lines.front()->the_list());
_session.begin_reversible_command (_("add pan automation event"));
_session.add_undo (alist.get_memento());
XMLNode &before, &after;
before = alist.get_state();
alist.add (when, y);
_session.add_undo (alist.get_memento());
after = alist.get_state();
_seession.add_command(MementoCommand<AutomationList>(alist, before, after));
_session.commit_reversible_command ();
_session.set_dirty ();
}