X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fautomation_time_axis.cc;h=c3f53d266c5740ea6d119a9ee1bda5852cad1c56;hb=691b0c10ac8089efa015e88513d309768fe0f44b;hp=776dff37f21c8e49b815342e96b8ff2708ac2fa3;hpb=0d6c5f78e9b7986afb220c559015da53a36e4e03;p=ardour.git diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 776dff37f2..c3f53d266c 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -573,7 +573,7 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS case Cut: if ((what_we_got = alist.cut ((*i).start, (*i).end)) != 0) { editor.get_cut_buffer().add (what_we_got); - _session.add_command (new MementoCommand(alist, &before, &alist.get_state())); + _session.add_command (new MementoCommand(alist, new XMLNode (before), &alist.get_state())); ret = true; } break; @@ -585,7 +585,7 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS case Clear: if ((what_we_got = alist.cut ((*i).start, (*i).end)) != 0) { - _session.add_command (new MementoCommand(alist, &before, &alist.get_state())); + _session.add_command (new MementoCommand(alist, new XMLNode (before), &alist.get_state())); delete what_we_got; what_we_got = 0; ret = true; @@ -593,7 +593,9 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS break; } } - + + delete &before; + if (what_we_got) { for (AutomationList::iterator x = what_we_got->begin(); x != what_we_got->end(); ++x) { double foo = (*x)->value;