diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-19 23:37:46 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-19 23:37:46 -0500 |
commit | 6e38ecc158c13dc7eafe74f018f7887d5514b0be (patch) | |
tree | 2ec0d7501aa08f7a3f2665f44dc2befefe7fd916 /gtk2_ardour/automation_region_view.cc | |
parent | a9cdd5f2c81063cc8f411520e0a5b28e04507ca4 (diff) |
manually applied equivalent of 1d82f4ca07a38342e0815cd6b695b96d72386f39 in master (git could not apply successfully)
Diffstat (limited to 'gtk2_ardour/automation_region_view.cc')
-rw-r--r-- | gtk2_ardour/automation_region_view.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index 0f62d3636c..9a96b4b0be 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -27,6 +27,8 @@ #include "ardour/midi_region.h" #include "ardour/session.h" +#include "gtkmm2ext/keyboard.h" + #include "automation_region_view.h" #include "editing.h" #include "editor.h" @@ -120,7 +122,11 @@ AutomationRegionView::canvas_event (GdkEvent* ev) y = std::max (y, 0.0); y = std::min (y, _height - NAME_HIGHLIGHT_SIZE); - add_automation_event (ev, trackview.editor().pixel_to_sample (x) - _region->position() + _region->start(), y); + /* no guard points if primary modifier is used */ + + bool with_guard_points = !Gtkmm2ext::Keyboard::modifier_state_equals (ev->button.state, Gtkmm2ext::Keyboard::PrimaryModifier); + + add_automation_event (ev, trackview.editor().pixel_to_sample (x) - _region->position() + _region->start(), y, with_guard_points); } return false; @@ -130,7 +136,7 @@ AutomationRegionView::canvas_event (GdkEvent* ev) * @param y y position, relative to our TimeAxisView. */ void -AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double y) +AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double y, bool with_guard_points) { if (!_line) { boost::shared_ptr<Evoral::Control> c = _region->control(_parameter, true); @@ -160,7 +166,7 @@ AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double view->session()->begin_reversible_command (_("add automation event")); XMLNode& before = _line->the_list()->get_state(); - _line->the_list()->add (when_d, y); + _line->the_list()->add (when_d, y, with_guard_points); XMLNode& after = _line->the_list()->get_state(); |