From 6536655a0aad2533f0e3e34e3673abc7acc3e293 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 14 Feb 2021 16:45:49 -0700 Subject: [PATCH] add explanatory comment --- gtk2_ardour/editor_drag.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 844e588c1f..9c87570ced 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -6969,6 +6969,11 @@ NoteCreateDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor) /* minimum initial length is grid beats */ _note[1] = _note[0] + grid_beats; + /* the note positions we've just computed are in absolute beats, but + * the drag rect is a member of the region view group, so we need + * coordinates relative to the region in order to draw it correctly. + */ + const timepos_t rrp1 (_region_view->region()->region_relative_position (_note[0])); const timepos_t rrp2 (_region_view->region()->region_relative_position (_note[1]));