A review of this PR found that a drag ending without drag_stopped (taken
away, or the button let go where the strip doesn't see it) dropped its
state without committing, so a stop the preview had removed stayed
removed with no History step and was committed with the next edit. Any
end of the drag now commits what the preview shows. The off-strip
distance is one helper shared by the Gradient Map, the Gradient tool and
the shape gradient editor, and the tests check the History steps too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZbgszHyuEuWAzxaamteuU
A layer with an opaque default pixel is empty when its stored tiles
cover the canvas and are clear on it; parts of the canvas without a
tile show the default. The empty layers are cached per document (a
Weak to it) instead of per revision, which a selection moves too.
Tests: an opaque default erased over the canvas, a selection and a
second document, a hidden group with a visible child.
Integer alpha is above 0 where any of its bytes is, so blocks of pixels
are OR-ed together instead of decoding each sample, and tiles are scanned
in parallel. Three completely erased 36 MP layers (release): 87 ms
before, 11 ms after.
With the panel docking layout on (any customized workspace), Window ›
Layers closes the Layers panel in that layout, which the dock group's
reveal doesn't reopen. Find Layers now shows it through
window.panel.activate there, as a new adjustment layer shows Properties.
A Save Document script that closes or moves a tab changed the document list between the script event and the Image Assets continuation, which reused a resolved-before index: the saved document's outputs were silently skipped, or a shifted-to index exported another tab's. document_saved now takes the DocId, resolves it only after the script ran, and generates nothing when the script closed the saved document.
Clicking Select › Find Layers ran the command in the frame of the click,
so the Name field asked for the focus in a frame with a pointer press
elsewhere and egui dropped it at the end of that frame. The focus now
waits for a frame without a press or release. New tests click the real
menu item, and close the Layers panel from Window › Layers before the
shortcut.
As in Photoshop, Find Layers (Ctrl+Alt+Shift+F) no longer selects the
layers whose name matches. From the menu or its shortcut it shows the
Layers panel, switches the filter to Name and puts the caret in the Name
field with its text selected, so typing replaces it. With a `name` param
(scripts and agents) it sets the Name text instead. The layer selection
is unchanged either way.
select.findLayers no longer changes the selection and no longer fails
when nothing matches; its reply lists the matching ids in `selected`, as
before, and the Name filter applied in a new `layerFilter` field.
Fixes#10884