diff options
author | nick_m <mainsbridge@gmail.com> | 2015-10-30 21:14:16 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-10-30 21:14:16 +1100 |
commit | 5e7c7e52bd482dbdf8629b284781543975672766 (patch) | |
tree | d4e19484417b2525cfcbc25ca4101711d5a8240b /gtk2_ardour/automation_time_axis.cc | |
parent | 6d98ccf9014ff287827b12e8f845cd0aea2f8837 (diff) |
Use automation line's frame of reference for y position.
- removes the need for 'pixel hunting' wrt NAME_HIGHLIGHT_SIZE.
- new control points generated by clicking on a line are placed
where the verbose canvas cursor says they are.
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 1ff3024ac6..cb2a3b44ea 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -628,11 +628,11 @@ AutomationTimeAxisView::add_automation_event (GdkEvent* event, framepos_t when, double x = 0; - _canvas_display->canvas_to_item (x, y); + _line->grab_item().canvas_to_item (x, y); /* compute vertical fractional position */ - y = 1.0 - (y / height); + y = 1.0 - (y / _line->height()); /* map using line */ |