Click/Drag Threshold overrides selected object
Migrated from https://bugs.launchpad.net/inkscape/+bug/1066474
Preliminary settings (to facilitate reproducing the bug)
- Go to Inkscape Preferences -> Mouse
- Turn down Grab Sensitivity to 0.
- Turn up Click/Drag Threshold to 20.
Steps to reproduce:
- Draw a rectangle.
- Draw another rectangle, with one edge touching the first rectangle's edge with minimal or no overlap. You'll end up with two rectangles next to each other.
- Using the Select tool, click once on the very limit of the second rectangle's edge where it touches the first rectangle's edge. Notice that the second rectangle is selected; your mouse is positioned over the second rectangle.
- Without moving your mouse, click and hold down, then drag your mouse over to the first rectangle.
What happened?
Notice that the first rectangle is dragged, even though you clearly dragged the second rectangle.
I'm guessing that this bug also affects anything else that uses the deadzone, not just the drag function. The most obvious explanation is that at the moment of starting to move the object, Inkscape figures out what is below the mouse cursor, when it should instead be using the original click point. However, if you reproduce the bug without creating the first rectangle, the second rectangle will be dragged even though the cursor is located over nothing when the dragging starts.
Inkscape drops the current selection and grabs the object which is positioned underneath the cursor position after having reached the click/drag threshold (distance from the pointer position where drag operation was started).
What should have happened?
The selected rectangle should have been dragged (selected object takes priority).
Inkscape Version and Operating System:
- Inkscape Version: Inkscape 0.48.3.1, 0.48+devel r11799 and 1.0beta2 (074b463, 2020-02-02)/0.92.0+devel+201807081751~ubuntu18.04.1
- Operating System: OSX, macOS/Ubuntu
- Operating System version: 10.7.4, 10.12.6/18.04.1
Additional Information/Notes:
Apart from being a bit annoying, it has some other unfortunate side effects:
- When using the spacebar to clone an object in place, sometimes the default 4px distance is enough for the cursor to grab something nearby the duplicated object rather than the duplicate itself. The result is that the object is duplicated, but Inkscape selects and moves a different object rather than pulling along the duplicate, as it should. This happens a lot with text and other thin objects.
- As mentioned before, sometimes the object clicked on to drag is not the object that is dragged. This is especially terrible in combination with
Bug 1781898 : https://bugs.launchpad.net/inkscape/+bug/1781898Issue #1494.