Fix saving automation record undo
Calling AutomationList::before() clears the state.
This commit is contained in:
@@ -310,9 +310,10 @@ void
|
||||
AutomationControl::commit_transaction (bool did_write)
|
||||
{
|
||||
if (did_write) {
|
||||
if (alist ()->before ()) {
|
||||
XMLNode* before = alist ()->before ();
|
||||
if (before) {
|
||||
_session.begin_reversible_command (string_compose (_("record %1 automation"), name ()));
|
||||
_session.commit_reversible_command (new MementoCommand<AutomationList> (*alist ().get (), alist ()->before (), &alist ()->get_state ()));
|
||||
_session.commit_reversible_command (alist ()->memento_command (before, &alist ()->get_state ()));
|
||||
}
|
||||
} else {
|
||||
alist ()->clear_history ();
|
||||
|
||||
Reference in New Issue
Block a user