*/
#include <iostream>
-
#include "ardour/automation_control.h"
#include "ardour/automation_watch.h"
#include "ardour/event_type_map.h"
#include "ardour/session.h"
+#include "pbd/memento_command.h"
+
+#include "i18n.h"
+
using namespace std;
using namespace ARDOUR;
using namespace PBD;
if (alist()->automation_state() == Touch) {
/* subtle. aligns the user value with the playback */
set_value (get_value ());
+ _before = &alist ()->get_state ();
alist()->start_touch (when);
if (!_desc.toggled) {
AutomationWatch::instance().add_automation_watch (shared_from_this());
if (!_desc.toggled) {
AutomationWatch::instance().remove_automation_watch (shared_from_this());
}
+
+ _session.begin_reversible_command (_("record automation controller"));
+ _session.add_command (new MementoCommand<AutomationList> (*alist ().get (), _before, &alist ()->get_state ()));
+ _session.commit_reversible_command ();
}
}
}