From 32b18073e8af4fadb7c5f9f00ad0e04f3114433e Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Sun, 27 Aug 2023 10:40:56 -0500 Subject: [PATCH] more enforcement of left->right freehand drawing (fixes velocity drawing) --- gtk2_ardour/editor_drag.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 6dbc869659..b913265efc 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -7290,13 +7290,11 @@ FreehandLineDrag::motion (GdkEvent* ev, bool firs dragging_line->set_outline_width (2.0); dragging_line->set_outline_color (UIConfiguration::instance().color ("automation line")); - if (ev->motion.x > grab_x()) { - direction = 1; - edge_x = 0; - } else { - direction = -1; - edge_x = std::numeric_limits::max(); - } + /* for freehand drawing, we only support left->right direction, for now. */ + direction = 1; + edge_x = 0; + /* TODO: allow the user to move "far" left, and then start drawing from the new leftmost position. + ...start_grab() already occurred so this is non-trivial */ /* Add a point correspding to the start of the drag */