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.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/gtk2_ardour/gain_automation_time_axis.cc b/gtk2_ardour/gain_automation_time_axis.cc
index 7e4a1b1fbf..c1261fdf23 100644
--- a/gtk2_ardour/gain_automation_time_axis.cc
+++ b/gtk2_ardour/gain_automation_time_axis.cc
@@ -63,12 +63,10 @@ GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkE
lines.front()->view_to_model_y (y);
_session.begin_reversible_command (_("add gain automation event"));
-
- XMLNode &before = curve.get_state();
+ XMLNode& before = curve.get_state();
curve.add (when, y);
- XMLNode &after = curve.get_state();
- _session.add_command(new MementoCommand<ARDOUR::Curve>(curve, &before, &after));
- _session.commit_reversible_command ();
+ XMLNode& after = curve.get_state();
+ _session.commit_reversible_command (new MementoCommand<ARDOUR::Curve>(curve, &before, &after));
_session.set_dirty ();
}