Skip to content

Fix rubberband

Rastersoft requested to merge rastersoft/desktop-icons:fix_rubberband into master

When the user starts a rubberband selection and, while doing it, exits the desktop (for example by going so high that the mouse cursor enters the top bar, or if it enters another window in the desktop), when the mouse enters again in the desktop, the rubberband selection is terminated, no matter the user still have the mouse button pressed and wants to continue selecting more files. This is because the current code, as soon as the mouse cursor leaves the grid actor to enter an actor that doesn't belong to it, ends the rubberband selection.

Also, when an icon has been previously selected by covering it by a rubberband, it never gets unselected if the rubberband is moved as to stop covering it.

The first commit in this MR modifies this by grabbing the stage when the rubberband starts, and only terminates it when the user releases the button, or when the mouse leaves the current screen (because it doesn't support multimonitor yet).

The second commit in this MR modifies how the rubberband works when an icon stops being covered by the rubberband selection, ensuring that only the icons covered by the rubberband are kept as selected.

Fixes #33 (closed)

Edited by Rastersoft

Merge request reports