Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Add ability to start lasso select within object without dragging layers

Open hemu opened this issue 6 months ago • 1 comments

When beginning a lasso select from within an object, currently the behavior is to drag its layers. This PR updates this behavior such that a lasso select beginning within an object will remain a lasso selection over the existing layers.

Refactor select_tool and path_tool transition drag logic to determine an "intent" up front. This made it easier to incorporate the type of logic needed in this PR where the lasso select intent has priority over others, but its logic is shared with box select which has the lowest priority so it was hard to capture this in the existing if/else chain.

Part of #2647

NOTE: This is an alternate implementation compared to this simpler change: https://github.com/GraphiteEditor/Graphite/pull/2798

Before

https://github.com/user-attachments/assets/86142094-4e4d-4457-9f6c-241df25c3ad0

After

https://github.com/user-attachments/assets/64d97867-e38b-4699-8271-e51b4ba6af6f

hemu avatar Jun 29 '25 22:06 hemu

if this change is too involved and not preferred there is a simpler change here: https://github.com/GraphiteEditor/Graphite/pull/2798

hemu avatar Jun 30 '25 00:06 hemu

I tested this and didn't find any obvious regressions @Keavon 👍

otdavies avatar Jul 01 '25 07:07 otdavies

@hemu could you please resolve the merge conflict? I tried but it looks like it affects the structure of an if-else statement that changed. Thanks.

Also, please mark this as ready for review and comment when you've completed this. I'm marking it as a draft for now while waiting the resolution.

Keavon avatar Jul 05 '25 22:07 Keavon

looking at the other merged commits in the past week that intersect with the same files in this PR, i think too much has changed underneath and the safer thing to do at this point is redo this entirely. will close this and take another crack at in a new PR so it can get retested and re-reviewed with same level of scrutiny as a new change

hemu avatar Jul 06 '25 14:07 hemu

When you have your redo ready, please push it to this branch and reopen the same PR rather than filing a new PR.

Keavon avatar Jul 06 '25 20:07 Keavon