Bind the two develop gestures that were described and not bound

FR-DEV-16's book said resetting a control and hiding a mask layer were
reachable by pointer and by finger, and stopped there. The reason was
honest: the generated rows have no focus, so "reset the focused control"
named a thing the panel could not point at. But a photographer at the
keyboard means something narrower than focus. They mean the slider they
just dragged too far, and that is a thing the panel can remember.

So the Adjustments global keeps the last control moved — two indices,
written where the panel forwards the change and cleared when the next
photograph opens, so a reset cannot reach back into the previous edit
through an index that happens to be shared. R puts it back, through the
same callback the track's double-click takes, and is silent until
something has moved.

The mask layer needs no such notion, because the panel already has a
selection: the rows the edge controls point at. H hides or shows those,
through the path the ring at the head of the row takes, so it is an edit
and a history step exactly as the ring is. A mixed selection goes to
shown, since the layer nobody can see is the one being asked about.

Both tags now carry the key, and the book says so.
This commit is contained in:
2026-09-12 01:08:09 +02:00
parent 2836ec2881
commit 9cc52fd72b
10 changed files with 147 additions and 55 deletions
+14
View File
@@ -995,6 +995,18 @@ export global Adjustments {
callback param-changed(int, int, float);
callback param-reset(int, int);
/// TRACES: FR-DEV-16
/// The control last moved, so a key can put it back.
///
/// The generated rows have no focus: they are a model the repeater
/// rebuilds, and a focus ring for them would be a larger change than the
/// binding wants. What a photographer means by "reset that" from the
/// keyboard is the slider they just dragged too far, and that is a thing
/// the panel can remember without any of them being focused. -1 is none,
/// which is where every photograph starts — see `lib.rs`, which clears
/// these on open so the key cannot reach back into the previous edit.
in-out property <int> touched-op: -1;
in-out property <int> touched-param: -1;
/// Every parameter of one operation back to its default. A section's reset
/// and a curve's reset are the same action, so they share the one callback
/// rather than duplicating a handler that would have to be kept in step
@@ -1511,6 +1523,8 @@ export component AdjustPanel inherits Rectangle {
curve-channel: Adjustments.curve-channel;
drag-changed(on) => { root.slider-dragging = on; }
param-changed(op, param, v) => {
Adjustments.touched-op = op;
Adjustments.touched-param = param;
Adjustments.param-changed(op, param, v);
}
param-reset(op, param) => { Adjustments.param-reset(op, param); }