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

@ -1801,7 +1801,7 @@ AudioDiskstream::transport_stopped (struct tm& when, time_t twhen, bool abort_ca
// cerr << _name << ": there are " << capture_info.size() << " capture_info records\n";
_session.add_undo (_playlist->get_memento());
XMLNode &before = _playlist->get_state();
_playlist->freeze ();
for (buffer_position = channels[0].write_source->last_capture_start_frame(), ci = capture_info.begin(); ci != capture_info.end(); ++ci) {
@ -1832,7 +1832,8 @@ AudioDiskstream::transport_stopped (struct tm& when, time_t twhen, bool abort_ca
}
_playlist->thaw ();
_session.add_redo_no_execute (_playlist->get_memento());
XMLNode &after = _playlist->get_state();
_session.add_command (MementoCommand<Playlist>(*_playlist, before, after));
}
mark_write_completed = true;