From d0b643b116ddf7d97e242d53b15c0667f3cdb3fd Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 10 Jan 2025 11:17:59 -0700 Subject: [PATCH] do not use DragManager::current_pointer_x() directly during drags That ignores a _bounding_item and can give incorrect coordindates for the drag when that is used (e.g. clip editor) --- gtk2_ardour/editor_drag.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 30edfd5f31..ee28edc3ea 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -518,7 +518,7 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll) if (old_move_threshold_passed != _move_threshold_passed) { /* just changed */ - if (fabs (_drags->current_pointer_y () - _grab_y) > fabs (_drags->current_pointer_x () - _grab_x)) { + if (fabs (current_pointer_y () - _grab_y) > fabs (current_pointer_x () - _grab_x)) { _initially_vertical = true; } else { _initially_vertical = false; @@ -6182,7 +6182,7 @@ NoteDrag::total_dx (GdkEvent* event) const } /* we need to use absolute positions here to honor the tempo-map */ - timepos_t const t1 = pixel_duration_to_time (_drags->current_pointer_x ()); + timepos_t const t1 = pixel_duration_to_time (current_pointer_x ()); timepos_t const t2 = pixel_duration_to_time (grab_x ()); /* now calculate proper `b@b` time */