darktable icon indicating copy to clipboard operation
darktable copied to clipboard

Make it easier to select feather points close to path points

Open TurboGit opened this issue 6 months ago • 10 comments

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 avatar May 30 '25 07:05 TurboGit

I'd like to have some testing on this.

TurboGit avatar Jun 19 '25 07:06 TurboGit

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)?

dterrahe avatar Jun 19 '25 12:06 dterrahe

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.

TurboGit avatar Jun 19 '25 16:06 TurboGit

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.

jenshannoschwalm avatar Jun 19 '25 17:06 jenshannoschwalm

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.

dterrahe avatar Jun 21 '25 09:06 dterrahe

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

TurboGit avatar Jun 21 '25 10:06 TurboGit

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).

dterrahe avatar Jun 21 '25 11:06 dterrahe

@dterrahe : Done, thanks for the hint!

TurboGit avatar Jun 21 '25 15:06 TurboGit

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?

dterrahe avatar Jun 21 '25 16:06 dterrahe

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.

TurboGit avatar Jun 21 '25 16:06 TurboGit