summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_region_view.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-20 12:01:39 -0500
committerDavid Robillard <d@drobilla.net>2014-11-20 12:01:39 -0500
commit7def8de5a3ce6ca6e022075bf3b9faf24fc2a129 (patch)
tree346454ed98c3f43e315373ce480a8fc45f2a2098 /gtk2_ardour/automation_region_view.cc
parent8f8a4878f30795b7ac5398c8daa6b01b5c6d4468 (diff)
Use memento_command_binder() to (probably) fix MSVC build and other things.
Remove ugly hack that does the same thing.
Diffstat (limited to 'gtk2_ardour/automation_region_view.cc')
-rw-r--r--gtk2_ardour/automation_region_view.cc10
1 files 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<ARDOUR::MidiRegion> mr = boost::dynamic_pointer_cast<ARDOUR::MidiRegion> (_region);
- assert (mr);
-
view->session()->commit_reversible_command (
- new MementoCommand<ARDOUR::AutomationList> (new ARDOUR::MidiAutomationListBinder (mr->midi_source(), _parameter), &before, &after)
- );
-
+ new MementoCommand<ARDOUR::AutomationList> (_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<ARDOUR::AutomationList>(*my_list.get(), &before, &my_list->get_state()));
+ new MementoCommand<ARDOUR::AutomationList>(_line->memento_command_binder(), &before, &my_list->get_state()));
return true;
}