From ac68fcb880af79e55f28c86adffb6b8f65be014e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 10 Jul 2023 14:39:23 -0600 Subject: [PATCH] automation drawing: fix right-to-left free drawing --- gtk2_ardour/editor_drag.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index da0775d27e..adaee1b65c 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -7285,8 +7285,10 @@ AutomationDrawDrag::motion (GdkEvent* ev, bool first_move) if (ev->motion.x > grab_x()) { direction = 1; + edge_x = 0; } else { direction = -1; + edge_x = std::numeric_limits::max(); } /* Add a point correspding to the start of the drag */ @@ -7340,6 +7342,7 @@ AutomationDrawDrag::maybe_add_point (GdkEvent* ev, timepos_t const & cpos) if (line && dragging_line->get().size() > 1) { pop_point = true; } + add_point = true; } } @@ -7358,7 +7361,7 @@ AutomationDrawDrag::maybe_add_point (GdkEvent* ev, timepos_t const & cpos) dragging_line->add_point (ArdourCanvas::Duple (x, y)); drawn_points.push_back (Evoral::ControlList::OrderedPoint (pos, y)); } - edge_x = x; + edge_x = pointer_x; } }