Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Lasso/box selection switching and usage over existing layers

Open Keavon opened this issue 9 months ago • 2 comments

We want to update dragging and selection such that:

  • Ctrl+drag's lasso selection, upon releasing Ctrl, switches to a regular box selection, and back to lasso by holding Ctrl again. It draws a straight line between the cursor position last time the lasso was removed and when it's now restored, allowing the user to also use this as a technique for drawing straight line sections of the lasso, but also just to decide to use box selection instead of lasso at any time.
  • Ctrl+dragging an object currently drags its layer(s) but we want to make it instead always lasso select. This lets the user perform a lasso selection over an existing layer, or a box selection but releasing Ctrl as in the previous bullet point.
  • Lasso selection has a bug that should be fixed: aborting the lasso selection (RMB or Esc) then creating a new lasso selection ends up erroneously extending the previously drawn lasso path because abort fails to clear the lasso data (which also wastes memory!). (#2792)

Keavon avatar May 16 '25 04:05 Keavon

opened https://github.com/GraphiteEditor/Graphite/pull/2792 to address the last issue mentioned:

Lasso selection has a bug that should be fixed: aborting the lasso selection (RMB or Esc) then creating a new lasso selection ends up erroneously extending the previously drawn lasso path because abort fails to clear the lasso data (which also wastes memory!).

hemu avatar Jun 29 '25 03:06 hemu

opened https://github.com/GraphiteEditor/Graphite/pull/2799 to address the second issue mentioned:

Ctrl+dragging an object currently drags its layer(s) but we want to make it instead always lasso select. This lets the user perform a lasso selection over an existing layer, or a box selection but releasing Ctrl as in the previous bullet point.

if this change is too much / isn't preferred there is an alternative simpler change: https://github.com/GraphiteEditor/Graphite/pull/2798 . This one felt kind of brittle, needing to sprinkle !lasso_select conditions in multiple places, so it lead me to try to refactor and create the first PR.

hemu avatar Jun 30 '25 00:06 hemu