Fixed Box selection with the Select tool and Path tool to follow canv…#3718
Conversation
In all cases, the document-space start point and document-space current pointer position should determine the bounding box shown, as well as the current document tilt. You can always take those three parameters (start point, current point, current tilt) and draw a rectangle matching the document space coordinates of them (but transformed into viewport space for the final drawing of the rectangle, since overlays are in viewport space). |
Thanks for the clarification! I think the current implementation already handles this correctly for both panning and zooming. |
Fixes #2391
When performing a box selection with the Select tool, panning (via scroll wheel) would cause the selection rectangle's starting point to move with the viewport instead of staying fixed on the canvas.
Solution
Store the drag start position in document coordinates (drag_start_document) rather than viewport coordinates
Transform this document anchored point back to viewport space when computing the selection box
Remove the viewport shift compensation for the start point during auto panning since the start is now properly anchored to document space
Still confused about the expected outcome for zooming, can you clarify more for what should be the output for it?
Recording.2026-02-04.235848.mp4