summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_region_view.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-09-14 05:24:28 +1000
committernick_m <mainsbridge@gmail.com>2015-10-20 00:53:27 +1100
commit17294ab9ec2d0b826dce88930148fda0f5e978b3 (patch)
treefbcca294ff1009370e3a12366b5fd8df17abee06 /gtk2_ardour/automation_region_view.cc
parent03df442d0e5878868a7bc945cf23371271e67c42 (diff)
Make control point selection more consistent.
- disallow simultaneous events via ControlList::editor_add () - clicking on an automation line selects the points that define it. - don't 'flash' a region selection when using mousedraw mode. - cp click selection resembles region selection. - region gain points respect snap modifier (a la automation points).
Diffstat (limited to 'gtk2_ardour/automation_region_view.cc')
-rw-r--r--gtk2_ardour/automation_region_view.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc
index 5450815329..f1f9d68b98 100644
--- a/gtk2_ardour/automation_region_view.cc
+++ b/gtk2_ardour/automation_region_view.cc
@@ -187,17 +187,18 @@ AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double
double when_d = when;
_line->view_to_model_coord (when_d, y);
- view->editor().begin_reversible_command (_("add automation event"));
XMLNode& before = _line->the_list()->get_state();
- _line->the_list()->editor_add (when_d, y, with_guard_points);
+ if (_line->the_list()->editor_add (when_d, y, with_guard_points)) {
+ view->editor().begin_reversible_command (_("add automation event"));
- XMLNode& after = _line->the_list()->get_state();
+ XMLNode& after = _line->the_list()->get_state();
- view->session()->add_command (new MementoCommand<ARDOUR::AutomationList> (_line->memento_command_binder(), &before, &after));
- view->editor().commit_reversible_command ();
+ view->session()->add_command (new MementoCommand<ARDOUR::AutomationList> (_line->memento_command_binder(), &before, &after));
+ view->editor().commit_reversible_command ();
- view->session()->set_dirty ();
+ view->session()->set_dirty ();
+ }
}
bool