From 7def8de5a3ce6ca6e022075bf3b9faf24fc2a129 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 20 Nov 2014 12:01:39 -0500 Subject: [PATCH] Use memento_command_binder() to (probably) fix MSVC build and other things. Remove ugly hack that does the same thing. --- gtk2_ardour/automation_region_view.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index 76591fa3d8..ab13a99c16 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -180,14 +180,8 @@ AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double XMLNode& after = _line->the_list()->get_state(); - /* XXX: hack! */ - boost::shared_ptr mr = boost::dynamic_pointer_cast (_region); - assert (mr); - view->session()->commit_reversible_command ( - new MementoCommand (new ARDOUR::MidiAutomationListBinder (mr->midi_source(), _parameter), &before, &after) - ); - + new MementoCommand (_line->memento_command_binder(), &before, &after)); view->session()->set_dirty (); } @@ -215,7 +209,7 @@ AutomationRegionView::paste (framepos_t pos XMLNode& before = my_list->get_state(); my_list->paste(*slist, model_pos, times); view->session()->add_command( - new MementoCommand(*my_list.get(), &before, &my_list->get_state())); + new MementoCommand(_line->memento_command_binder(), &before, &my_list->get_state())); return true; }