From b154541f9f714a6b209c7a0fb097f8a6b11181f3 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 23 Nov 2025 13:25:14 -0700 Subject: [PATCH 1/2] fix up coordinate use during freehand line drags --- gtk2_ardour/editor_drag.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index bc4552af58..adf1625fa8 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -7533,11 +7533,16 @@ FreehandLineDrag::maybe_add_point (GdkEvent* ev, } if (child_call) { + /* Coordinates passed to these two methods use *canvas* + * coordinate space for the x-axis + */ + x = editing_context.timeline_to_canvas (timeline_x); + if (straight_line && !first_move) { - line_extended (ArdourCanvas::Duple (line_start_x, line_start_y), ArdourCanvas::Duple (x, y), base_rect, first_move ? -1 : edge_x); + line_extended (ArdourCanvas::Duple (line_start_x, line_start_y), ArdourCanvas::Duple (x, y), base_rect, first_move ? -1 : x); } else { - point_added (ArdourCanvas::Duple (x, y), base_rect, first_move ? -1 : edge_x); + point_added (ArdourCanvas::Duple (x, y), base_rect, first_move ? -1 : editing_context.timeline_to_canvas (edge_x)); } } From e301a71c647b7fc8d6844f1ac1bab5c989a6075e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 23 Nov 2025 13:25:42 -0700 Subject: [PATCH 2/2] reduce the number of pixels used as "close by" by velocity display --- gtk2_ardour/velocity_display.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/velocity_display.cc b/gtk2_ardour/velocity_display.cc index 2a1fb9f1d9..6af1bf1d27 100644 --- a/gtk2_ardour/velocity_display.cc +++ b/gtk2_ardour/velocity_display.cc @@ -87,7 +87,7 @@ VelocityDisplay::line_draw_motion (ArdourCanvas::Duple const & d, ArdourCanvas:: std::vector affected_lollis; if (last_x < 0) { - lollis_close_to_x (d.x, 20., affected_lollis); + lollis_close_to_x (d.x, 10., affected_lollis); } else if (last_x < d.x) { /* rightward, "later" motion */ lollis_between (last_x, d.x, affected_lollis);