mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
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:
parent
55159005b9
commit
b7bffbe7a2
16 changed files with 191 additions and 125 deletions
|
|
@ -61,9 +61,11 @@ GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkE
|
|||
|
||||
_session.begin_reversible_command (_("add gain automation event"));
|
||||
|
||||
_session.add_undo (curve.get_memento());
|
||||
XMLNode &before, &after;
|
||||
before = curve.get_state();
|
||||
curve.add (when, y);
|
||||
_session.add_redo_no_execute (curve.get_memento());
|
||||
after = curve.get_state();
|
||||
_session.add_command(MementoCommand<ARDOUR::Curve>(curve, before, after));
|
||||
_session.commit_reversible_command ();
|
||||
_session.set_dirty ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue