mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
r184@gandalf: fugalh | 2006-07-17 19:02:10 -0600
(begin|commit)_reversible_command in Editor and Session git-svn-id: svn://localhost/ardour2/branches/undo@684 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
72168803ee
commit
d819b922e1
4 changed files with 15 additions and 14 deletions
|
|
@ -2970,8 +2970,8 @@ void
|
|||
Editor::begin_reversible_command (string name)
|
||||
{
|
||||
if (session) {
|
||||
UndoAction ua = get_memento();
|
||||
session->begin_reversible_command (name, &ua);
|
||||
before = get_state();
|
||||
session->begin_reversible_command (name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2979,8 +2979,12 @@ void
|
|||
Editor::commit_reversible_command ()
|
||||
{
|
||||
if (session) {
|
||||
UndoAction ua = get_memento();
|
||||
session->commit_reversible_command (&ua);
|
||||
// yes, cmd lasts long enough to be copied onto the action
|
||||
// list in the history, but this has the potential to be a
|
||||
// problem if memory management of actions changes in
|
||||
// UndoTransaction
|
||||
MementoCommand<Editor> cmd(*this, before, get_state());
|
||||
session->commit_reversible_command (&cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue