diff options
author | Robin Gareus <robin@gareus.org> | 2017-07-24 02:59:09 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-07-24 02:59:09 +0200 |
commit | b29b46d371b0721c49071481796ab2c7bcfc915f (patch) | |
tree | 63e075e31cfc0ae8441f615383407c7a1270fcc2 /libs/ardour/automation_control.cc | |
parent | 30f85faa49ab2a817dfe5d2313583559c52aef6e (diff) |
Fix saving automation record undo
Calling AutomationList::before() clears the state.
Diffstat (limited to 'libs/ardour/automation_control.cc')
-rw-r--r-- | libs/ardour/automation_control.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index 274e84f9f0..e9bc1aebe0 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -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 (); |