summaryrefslogtreecommitdiff
path: root/gtk2_ardour/gain_automation_time_axis.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/gain_automation_time_axis.cc')
-rw-r--r--gtk2_ardour/gain_automation_time_axis.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/gain_automation_time_axis.cc b/gtk2_ardour/gain_automation_time_axis.cc
index 5352015f11..c86c1390f3 100644
--- a/gtk2_ardour/gain_automation_time_axis.cc
+++ b/gtk2_ardour/gain_automation_time_axis.cc
@@ -20,6 +20,7 @@
#include <ardour/curve.h>
#include <ardour/route.h>
+#include <pbd/memento_command.h>
#include "gain_automation_time_axis.h"
#include "automation_line.h"
@@ -63,9 +64,10 @@ GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkE
_session.begin_reversible_command (_("add gain automation event"));
- _session.add_undo (curve.get_memento());
+ XMLNode &before = curve.get_state();
curve.add (when, y);
- _session.add_redo_no_execute (curve.get_memento());
+ XMLNode &after = curve.get_state();
+ _session.add_command(new MementoCommand<ARDOUR::Curve>(curve, before, after));
_session.commit_reversible_command ();
_session.set_dirty ();
}