X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fredirect_automation_time_axis.cc;h=529c0b565da3e1e22d815ff37f81703e6feb7dc8;hb=afa29d319007ce20bd1546c343e9277c58c80c1a;hp=d6e243233886d2d5d474cc52b04c2346ae2ef4f6;hpb=b7bffbe7a249356a93d25a41f7c472cc9dd8f27f;p=ardour.git diff --git a/gtk2_ardour/redirect_automation_time_axis.cc b/gtk2_ardour/redirect_automation_time_axis.cc index d6e2432338..529c0b565d 100644 --- a/gtk2_ardour/redirect_automation_time_axis.cc +++ b/gtk2_ardour/redirect_automation_time_axis.cc @@ -21,6 +21,7 @@ #include #include #include +#include #include "redirect_automation_time_axis.h" #include "automation_line.h" @@ -32,7 +33,8 @@ using namespace ARDOUR; using namespace PBD; using namespace Gtk; -RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, Canvas& canvas, std::string n, +RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, boost::shared_ptr r, + PublicEditor& e, TimeAxisView& parent, Canvas& canvas, std::string n, uint32_t prt, Redirect& rd, string state_name) : AxisView (s), @@ -72,7 +74,7 @@ RedirectAutomationTimeAxisView::~RedirectAutomationTimeAxisView () } void -RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y) +RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y) { double x = 0; @@ -97,11 +99,10 @@ RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, lines.front()->view_to_model_y (y); _session.begin_reversible_command (description); - XMLNode &before, &after; - before = alist.get_state(); + XMLNode &before = alist.get_state(); alist.add (when, y); - after = alist.get_state(); - _session.add_command(MementoCommand(alist, before, after)); + XMLNode &after = alist.get_state(); + _session.add_command(new MementoCommand(alist, &before, &after)); _session.commit_reversible_command (); _session.set_dirty (); }