diff options
author | David Robillard <d@drobilla.net> | 2007-07-04 22:57:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-04 22:57:13 +0000 |
commit | b57510a3a9d789ae1194d3fc6d136044850d3e42 (patch) | |
tree | d072b773faa3342f8cb3ae76d40130b38509bbb1 /gtk2_ardour/editor_mouse.cc | |
parent | a1052b0eca7bdc8ec1e3ac2996cd16bb48e2a6d2 (diff) |
Display correct value for verbose control point cursor for Midi CC (int) and plugin automation (map to parameter range).
Use double throughout for automation control point y coordinate instead of casting to this and that losing precision.
Fix crash bug in route automation menu.
git-svn-id: svn://localhost/ardour2/trunk@2107 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index d954c63e56..fe17b31abf 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -2374,7 +2374,7 @@ Editor::start_control_point_grab (ArdourCanvas::Item* item, GdkEvent* event) control_point->line.start_drag (control_point, drag_info.grab_frame, 0); - float fraction = 1.0 - ((control_point->get_y() - control_point->line.y_position()) / control_point->line.height()); + double fraction = 1.0 - ((control_point->get_y() - control_point->line.y_position()) / (double)control_point->line.height()); set_verbose_canvas_cursor (control_point->line.get_verbose_cursor_string (fraction), drag_info.current_pointer_x + 20, drag_info.current_pointer_y + 20); @@ -2412,7 +2412,7 @@ Editor::control_point_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* snap_to (cx_frames); } - float const fraction = 1.0 - ((cy - cp->line.y_position()) / cp->line.height()); + const double fraction = 1.0 - ((cy - cp->line.y_position()) / (double)cp->line.height()); bool push; @@ -2503,7 +2503,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event) start_grab (event, fader_cursor); - double const fraction = 1.0 - ((cy - line->y_position()) / line->height()); + const double fraction = 1.0 - ((cy - line->y_position()) / (double)line->height()); line->start_drag (0, drag_info.grab_frame, fraction); @@ -2521,7 +2521,7 @@ Editor::line_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event) line->parent_group().w2i (cx, cy); - double const fraction = 1.0 - ((cy - line->y_position()) / line->height()); + const double fraction = 1.0 - ((cy - line->y_position()) / (double)line->height()); bool push; |