* Eraser: add Erase to History (Brush, Pencil and Block modes)
Photoshop's Eraser has an Erase to History option; PhotoCraft had only the History Brush.
With it ticked, the Eraser paints the History panel's source state back instead of
erasing, through paint.historyBrush with eraseToHistory. Pencil and Block modes paint back
through their hard tips. A layer that did not exist in the source state paints that
state's visible image; the History Brush itself still refuses such a layer, as Photoshop's
does.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Keep tool_event within clippy's complexity limit
* Test Erase to History at every depth and tip
* Update the History Brush params comment for Erase to History
* Erase to History paints a layer made since only from a single-layer state
Compared with Photoshop 27.11.0: on a layer the source state does not hold, Erase to History paints
when that state holds a single layer, Background or not, and gives an error when it holds a second
layer, even an empty one. The composite of a multi-layer state is gone; those states now refuse
the layer with the History Brush's error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Erase to History paints a single source layer's own pixels
Photoshop 27.11.0 paints a layer made since with the source layer's pixels: a 50% opacity layer
gives a solid stroke, where the composite gave a faded one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Erase to History: Pencil mode paints at full flow; test a group-only source state
Pencil mode has no Flow control, so a lower Flow set in Brush mode must not carry over. A source
state holding only a group has no pixels of its own and refuses a layer made since.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Erase to History keeps its options if a tool key is pressed mid-stroke
The stroke read the current tool and brush when it was committed, so pressing a tool's letter
during the drag dropped eraseToHistory and the stroke failed on a layer made since. The options
and the Eraser's tip are now captured at the press.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Erase to History: a single solid shape paints its colour; name the History row
Photoshop 27.11.0 paints a shape layer's solid colour along the whole stroke, past its path, and
calls the stroke History Eraser in the History panel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Erase to History: a single shape without a solid fill paints white
Observed in Photoshop 27.11.0: a gradient, pattern or no fill paints plain white along the whole stroke, past the path and whatever the outline, in RGB, CMYK, Grayscale and Lab.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Eraser: Alt at the press reverses Erase to History for that stroke
As in Photoshop 27.11.0: with the option off Alt restores, with it on Alt erases. Alt pressed or released during the stroke changes nothing, and the option itself is left as it was.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Erase to History: name the Photoshop version compared
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Erase to History: review fixes for the error and the History Brush tip
A layer without pixels now gets the error that the target did not exist
in that history state, not "no active document". The History Brush keeps
its size, hardness and spacing from the press, as the Eraser does, if a
tool key is pressed mid-stroke.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Brush parity: add the Eraser's Erase to History
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Erase to History: document the functions this change touches
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* History Brush and Erase to History keep their whole brush from the press
Only mode, opacity, flow, size, hardness and spacing were kept from the press; the rest of the brush (tip shape, sampled tip, angle, dynamics, smoothing) came from the session brush at release. A tool key mid-stroke changed that brush, the commit rejected the live preview, and the fallback repainted the whole stroke with the new tool's brush. The stroke's params now carry the press-time brush as "brush" (stored tips as references, as each tool's remembered brush), and paint.historyBrush deep-merges it onto the session brush, so the live preview, the commit, its fallback and a replayed action all paint with it. Tests: a tool switch mid-stroke paints exactly what the same stroke paints without it, for the History Brush and Erase to History in Brush, Pencil and Block mode, across tip shape, sampled tips, dynamics and smoothing; a "brush" param paints as the session brush would; a malformed one is refused.
* History Brush docs: say "outside its shape", not "past its path"
The automation crate flags any command whose params text mentions a path as a possible filesystem path (registry_filesystem_path_params_are_classified); the eraseToHistory description meant a shape's vector outline. Also a test that a state whose one root item is a group of several layers is refused like the one-layer group: a group has no pixels to paint back.
* Test that a Shift-click Erase to History line commits its live pixels unsmoothed
Main's Shift-click fix (#11887) and this branch's press-time History
Brush params meet in finish_stroke_with; check the commit sends
smoothing 0 beside the brush param in all three Eraser modes.
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
RESERVED is process-wide. Under cargo test (the FreeBSD job) the module's tests run on threads of one process, so an_operation_that_fits_alone_waits_for_a_concurrent_one's reservation could land between reservations_are_bounded_and_returned's before and after counts (left: 434166548, right: 0). nextest on Linux gives each test its own process, which hid it. Locally the unfixed module failed 15 of 40 runs, the fixed one 0 of 40.
The Clone Stamp now starts, and comes back after Reset Tool and Reset All Tools, with the reference's 21 px soft round at 25 % spacing and no smoothing (#12601).
Typing a Blur Strength past 1..100 now stores the closest whole number and shows the reference's "Closest value inserted" alert once the field is left, as the Eraser's fields do. Sharpen and Smudge share the field but were not measured, so they keep the silent clamp.
A Paint Bucket click on a Solid Color fill layer shows the reference
question; OK only rasterizes the fill (one history state, no fill). The
catalogs that translated the old text translate the new one, a language
without an entry falls back to English, and no catalog keeps the old key.
A Paint Bucket (or other pixel tool) click on a fill layer asks "The fill
for this layer must be rasterized before proceeding. It will no longer be
editable as a fill. Rasterize the fill?", as measured in the reference
application. The 22 catalogs that translated the old text are re-keyed to
the new English text, so those languages keep a translation, as #11899
did for the smart object text. The test that pinned the four prompts now
expects the new fill text; OK and Cancel are unchanged.
A click that runs but changes no pixel (a blue pupil, a transparent area, an
empty layer, Darken Amount 0) now adds one unchanged history state instead of
the "no red-eye pixels" error, as in Photoshop. Non-RGB/Lab documents, channel
and mask targets, hidden layers and clicks outside the selection or the canvas
keep the error and add no state.
With Create new layer on, the result layer was "Layer N". Name it as the
reference does: "Remove tool edits", then "Remove tool edits 1", "2"...
taking the first free name.
path.convertPoint and path.moveHandle take an optional stepName (only
that one name is accepted, as with edit.transform), and the Convert Point
tool sends it. Direct Selection, the Pen's Alt conversion and the
Curvature Pen keep Convert Point and Drag Direction Point.
paint.dodge and its live stroke return the reference application's
message in Indexed Color and Bitmap documents and tone nothing; a press
with the Dodge tool shows it as a modal alert. Other modes keep dodging.
A saved path whose only anchor is deleted keeps its place in the Paths panel with no subpaths, as in Photoshop. The Work Path, a shape's path, a vector mask and a Type Path still refuse it.
Photoshop adds one unchanged "Art History Brush" state when the Tolerance holds back every dab. A stroke that could write nothing anyway (wholly outside the selection, on locked transparent pixels) stays a quiet no-op, and refusals still add no state.
Photoshop's bar holds only the preset picker and "No options for the Add Anchor Point Tool.", centred in the rest of the bar. The Alt hint goes; the Delete Anchor Point bar keeps its hint.