Skip to content

Make it easier to select feather points close to path points #18896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TurboGit
Copy link
Member

paths: Use SHIFT modifier to select only feather points.

When the border and the feather are very close from each other it is
difficult to select a specific point. The default are the border points,
when using SHIFT modifier only the feather points are selectable.

Note that for the ellipse the change of the feather mode (equidistant or
proportional) is now controlled by the ALT key. This change seems ok as
the feature is less frequent and SHIFT is the current key to resize
the feather for all masks.

@TurboGit TurboGit added this to the 5.4 milestone May 30, 2025
@TurboGit TurboGit added the feature: enhancement current features to improve label May 30, 2025
@TurboGit TurboGit self-assigned this May 30, 2025
@TurboGit TurboGit added documentation-pending a documentation work is required release notes: pending labels Jun 18, 2025
@TurboGit
Copy link
Member Author

I'd like to have some testing on this.

@dterrahe
Copy link
Member

I believe that for circle and ellipse, the feather point currently has priority so if they are on top of each other and you want to move the border point, you can first grab the feather, move it away, then grab the border and move it, then grab the feather and put it back on top of the border. So am I right in assuming that the thing that needed fixing (most) was the path nodes? It could be brought in line with circle & ellipse and prioritise feather? This behavior is maybe more "discoverable"? (especially since the new behavior is not mentioned in _set_hint_message)

Or is your main goal to bring consistency between adjusting feather by scrolling (+shift) and dragging (now also +shift if points close). That does make sense, but it means that modifier keys are needed more frequently when using mouse/pen. I have a slight preference for keeping current behavior for circle/ellipse and fixing path, but up to you.

Haven't been able to test, but looking at code, I wonder if the expected thing happens when you move the mouse to a border point that is covered by a feather point (this would show the border point as selected), then hold shift and then (without moving the mouse) click and then drag. Is it now dragging the feather (as intended) or the border (since that was the last selected)?

@TurboGit
Copy link
Member Author

Or is your main goal to bring consistency between adjusting feather by scrolling (+shift) and dragging (now also +shift if points close). That does make sense

That's exactly that. Without modifier we move a shape, without modifier with enlarge a shape with mouse wheel, without modifier we change main shape. So now for consistency work on the feather needs shift.

but it means that modifier keys are needed more frequently when using mouse/pen.

Not sure as shift is needed only when the point are to close to properly select the one we want. This case is no so common.

I'll check the hint message indeed.

@jenshannoschwalm
Copy link
Collaborator

I don't have any strong opinion at all. My main idea would be that by pressing some additional key should always result in the same action. So if shift is pressed always select feather point would be fine to me.

@dterrahe
Copy link
Member

I wonder if the expected thing happens when you move the mouse to a border point that is covered by a feather point (this would show the border point as selected), then hold shift and then (without moving the mouse) click and then drag. Is it now dragging the feather (as intended) or the border (since that was the last selected)?

Now tested and confirmed that indeed it functions as I expected; you can't just move to the overlapping points, then hold shift then click and drag to move the feather. You have to hold shift, then first move the mouse a little to get a mouse_moved event that switches the selection to the feather point, and only then click and drag to move the feather point.

@TurboGit
Copy link
Member Author

@dterrahe : Right, but I don't know how to do better.

@dterrahe
Copy link
Member

Maybe calling form->functions->mouse_moved(module, pzx, pzy, pressure, which, zoom_scale, form, unused1, gui, unused2);
in _group_events_button_pressed before calling sel->functions->button_pressed would reselect the right anchor (but since zoom_scale is not available here, you'd have to calculate it).

@TurboGit TurboGit force-pushed the po/sel-mask-feather branch from f807266 to 1234996 Compare June 21, 2025 15:57
@TurboGit
Copy link
Member Author

@dterrahe : Done, thanks for the hint!

@dterrahe
Copy link
Member

Ok, but now (just judging by the code) if you hold shift and move the mouse to the overlapping nodes and then release shift and then, without moving mouse first, click and drag, you'll still be moving the feather, instead of the border as intended, no? Doesn't always calling mouse_moved work?

When the border and the feather are very close from each other it is
difficult to select a specific point. The default are the border points,
when using SHIFT modifier only the feather points are selectable.

Note that for the ellipse the change of the feather mode (equidistant or
proportional) is now controlled by the ALT key. This change seems ok as
the feature is less frequent and SHIFT is the current key to resize
the feather for all masks.
@TurboGit TurboGit force-pushed the po/sel-mask-feather branch from 1234996 to fdd1d4b Compare June 21, 2025 16:20
@TurboGit
Copy link
Member Author

Ok, but now (just judging by the code) if you hold shift and move the mouse to the overlapping nodes and then release shift and then, without moving mouse first, click and drag, you'll still be moving the feather, instead of the border as intended, no? Doesn't always calling mouse_moved work?

You're plain right :) I wanted to save some CPU cycle. Now fixed.

Note that I have tried to save some CPU cycle again by calling mouse_moved() only if modifier has changed.

Copy link
Member

@dterrahe dterrahe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested if it works, but looks like it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation-pending a documentation work is required feature: enhancement current features to improve release notes: pending
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants