Automation -use editor_add in gui, record straight lines with fewer points.

- don't keep setting/unsetting write pass when transport frame
	  remains the same (think larger jack buffer sizes)
	- insert guards are now 64 frames after when.
	- refactor previous approach.
This commit is contained in:
nick_m 2015-06-15 16:35:19 +10:00
parent 7cb9dbb8af
commit 15819f0896
7 changed files with 46 additions and 27 deletions

View file

@ -644,10 +644,10 @@ AutomationTimeAxisView::add_automation_event (GdkEvent* event, framepos_t when,
_editor.begin_reversible_command (_("add automation event"));
XMLNode& before = list->get_state();
list->add (when, y, with_guard_points);
list->editor_add (when, y, with_guard_points);
XMLNode& after = list->get_state();
_session->add_command (new MementoCommand<ARDOUR::AutomationList> (*list, &before, &after));
_session->add_command (new MementoCommand<ARDOUR::AutomationList> (*list.get (), &before, &after));
_editor.commit_reversible_command ();
_session->set_dirty ();
}