Commit Graph
3894 Commits
Author SHA1 Message Date
David Mann 5ba0bb0a3a Merge pull request #12201 from hectorviov/fix/eyedropper-zoom-box
Eyedropper: at 100 % zoom and below an N by N Average covers (N+1) x (N+1) screen pixels (#11751)
2026-11-11 00:51:27 +01:00
David Mann e9ab58e1f5 Merge pull request #12209 from DuBearte/fix/11966-auto-erase-exact
Pencil Auto Erase: the start pixel must be exactly the foreground colour
2026-11-11 00:51:02 +01:00
David Mann ec40f3912a Merge pull request #12882 from Bobderto/codex/12829-freeform-history
fix: record Freeform Pen strokes with their tool name
2026-11-10 22:14:53 +01:00
David Mann 3cc12bcb2b Merge pull request #12969 from Bobderto/codex/12936-bracket-size-steps
fix(engine): follow Photoshop bracket-key brush size steps
2026-11-10 22:14:13 +01:00
David Mann 72e17777bc Merge pull request #11170 from DingusMcRinkyDinky/warp-fold-layers
Warp: a fold shows what's under its transparent parts
2026-11-10 22:14:00 +01:00
David Mann c76cc5b5ad Merge pull request #12998 from rmsff/fix/sharpen-refuses-indexed-12953
Sharpen: refuse Indexed Color and Bitmap documents
2026-11-10 21:46:48 +01:00
David Mann ecfa246f80 Merge pull request #12987 from Bobderto/codex/12881-pattern-stamp-origin
fix(paint): match unaligned Pattern Stamp origins
2026-11-10 21:21:56 +01:00
David Mann d6ead54a81 Merge pull request #12954 from rmsff/fix/object-selection-mode-refusal-12867
Object Selection: refuse Indexed Color and Bitmap documents
2026-11-10 21:21:45 +01:00
Michael Higginsandkayrockscreenprinting 6a676ee1be Save over a flat JPEG: JPEG Options, then in place; transparent ones offered as PNG (#2223)
Fixes #2223. Carries the in-place flat Save of #5865 (closed as superseded by this PR) and revives what #2515 (@kayrockscreenprinting, closed when its author stepped away) added beyond it.

File › Save now writes back over a flat file when that file still holds the document: one plain opaque layer the format can store, and only when the file held a single image. A JPEG (and a TIFF, Targa or DDS) asks its format options first, as Photoshop does; Cancel writes nothing. A JPEG whose lone layer has transparency it can't keep is offered as a PNG. Multi-image files (animations, multi-page TIFFs, multi-size icons, multi-part EXRs) still go through Save As; the source image count is kept through crash recovery.

Co-authored-by: kayrockscreenprinting <257643019+kayrockscreenprinting@users.noreply.github.com>
2026-11-10 20:26:48 +01:00
RickiNano 4af62e8abb fix(ui): Delete on an anchor selected with Add Anchor Point removes it, not the layer (#12703) (#12796)
* fix(ui): Delete on an anchor selected with Add Anchor Point removes it, not the layer (#12703)

With the Add Anchor Point tool and one anchor selected (Ctrl+click), Delete
and Backspace fell through to Edit > Clear and deleted the active layer.
They now remove the anchor and its two segments, as in the reference
application: a closed subpath opens there. One history step, Delete Anchor
Point.

- vector: edit::delete_anchor_and_segments (a closed subpath opens at the
  anchor; an open one loses an end or splits at an inner anchor)
- engine: path.deleteAnchor takes "segments": bool (default false keeps
  joining the neighbours, as the tool's click does)
- ui: delete_key_deletes_anchor next to delete_key_deletes_work_path, and a
  Delete/Backspace branch before the work path's

* test(vector): Delete on one anchor of a closed two-anchor subpath leaves the other, open (#12703)

The kept anchor retains its handles and smooth flag, and the subpath keeps its path operation.
2026-11-10 20:08:21 +01:00
rmsff cbff770f0e Test the Sharpen tool's Indexed Color and Bitmap refusal
Makes the Dodge refusal tests' session, steps and pixels helpers
pub(super) and reuses them.
2026-11-10 21:03:11 +03:00
rmsff 3b5a62e75f Sharpen: refuse Indexed Color and Bitmap documents (#12953)
paint.sharpen and its live stroke fail with the reference application's
alert text, and a press with the Sharpen tool opens that alert, as the
Dodge tool does since #12686.
2026-11-10 21:03:11 +03:00
FredApps 96581039a8 Merge main into feat/ui-217-4-columns-unit 2026-11-10 18:41:49 +01:00
David Mann 609e2aa727 Merge pull request #12883 from rmsff/fix/warp-split-default-thirds-12495
Warp: a one-way split on the Default grid keeps only the thirds across it
2026-11-10 18:38:59 +01:00
Dan ea771f39e0 fix(paint): match unaligned Pattern Stamp origins 2026-11-10 17:29:12 +00:00
2ec3ecf243 Type: render a paragraph-box handle drag off the UI thread (#7032) (#12316)
* Type: render a paragraph-box handle drag off the UI thread (#7032)

While a box handle is dragged the document is left alone: each move
records the wanted box, a worker lays out (holding the shared text engine
only for layout) and rasterizes a copy of the layer, and the canvas shows
the document with the newest finished render. One render runs at a time
and the latest box wins. Releasing, committing or any other end of the
drag applies the box with the same type.edit as before, so the final
document and its single history step are unchanged. Without background
jobs (web, tests, scripts) every move still runs type.edit.

* Address review: end a box drag before other commands, on a stale preview and for Type Mask edits

- A command other than a view command (Free Transform, a menu item, a
  shortcut) applies the dragged box and ends the drag before it runs.
- A preview gone stale (the document changed some other way) ends the
  gesture instead of applying the press-time box over that change.
- Type Mask edits keep the synchronous drag: their overlay is drawn from
  the document's layout.
- apply_box keeps the stored size finite and documents its units.
- Tests: a width drag that rewraps, each of the above.

* Address review: Free Transform and Save mid-drag see the dragged box

UI_COMMANDS is every shell-handled command, not only view ones, so the
exemption skipped edit.freeTransform and file.save. Only view., window.
and help. commands now leave a box drag going. Adds a Free Transform test
and requires a box shape when the huge-box edit succeeds.

* Address review: the Free Transform test checks the command succeeds and its frame is the resized layer's

* Address review: only listed view commands leave a box drag going

view.clearSelectedGuides edits the document, so a prefix exemption for
view. commands let it make the preview stale and lose the dragged box.
The exemption is now an explicit list of commands that change nothing in
the document, and a test covers the guide command.

* Address review: switching documents, engine.execute and app.save end a box drag first

- window.* commands are no longer exempt: window.nextDocument and
  window.previousDocument switch documents mid-drag.
- The control channel's engine.execute (engine commands) and app.save
  bypass menus::invoke, so they end the drag themselves.
- Tests: a control engine.execute and app.save mid-drag, and a document
  switch mid-drag.

* Address review: panel toggles leave a box drag going

Opening or closing a panel (Cmd+T toggles the Character panel while
typing) only lays out windows, so window.panel.*, window.toggle.* and
type.panels.* no longer end a drag. A test covers three of them.

* Address review: doc comments on the functions this change touches

CodeRabbit's docstring coverage check was at 73.68% against 80%. Adds a
doc comment to each touched function that had none: the new helpers and
tests, and the existing functions this change edits.

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:38:56 +01:00
Khawar Zamman WaniandFredApps b0a4fdeeca Transform presets flip the targeted vector mask (#12283) (#12330)
* Fix targeted vector mask flips via path transform (#12283)

* Target vector masks explicitly in path transforms

A shape layer's path is its content, so path.transform's layer target
took the shape path even when the layer's separate vector mask was
targeted. Add an explicit vectorMask flag to path.transform and have the
Transform presets use it, leaving the shape path and cache alone.

The UI's vector-mask target now yields to an active alpha channel or
Quick Mask, and an explicit target in the params still wins. Add engine
and UI regressions for the shape-plus-mask case and undo/redo.

* test(ui): fix vector-mask target precedence fixture

* chore: restart CI after wasm-bindgen download timeout

* fix: respect vector mask locks and cover rotation presets

* fix: guard implicit vector mask path transforms too

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-10 17:38:49 +01:00
David Mann c797e56f67 Merge pull request #12951 from rmsff/fix/art-history-mode-mismatch-12826
Art History Brush: refuse a source of another colour mode
2026-11-10 17:37:05 +01:00
Dan f53ca628af test(engine): update dual-tip bracket resize expectation 2026-11-10 16:05:18 +00:00
Dan 73450ce23b fix(engine): follow measured bracket-key brush sizes 2026-11-10 15:57:10 +00:00
Khawar Zamman WaniandFredApps e1145b604e Make text-on-path placement editable (#11629)
* Add path text placement ranges and drag gestures

* Preview path placement and track bounded canvas damage

* Preserve legacy path anchors and show overflow markers

* Match path marker hit targets and directional cursors

* Fix path placement lint failures

* Cover path text body movement and position locks

* Keep open path text movable at range endpoints

* Target the type path after attaching text

* Fix path text range rendering and placement lifecycle

* Map vertical path text and preserve drag branch continuity

* Cover path placement lifecycle and preview damage regressions

* Preserve closest branch projection and fix CI regressions

* Normalize path endpoints and bind gestures to their viewport

* Simplify viewport ownership guards for Clippy

* Document path placement invariants and regression cases

* Fix path placement ownership, validation and geometry caching

* Correct path placement regression fixtures

* Ignore transient path geometry cache in UI state equality

* fix: allow path text flips with stale placement ranges

* fix: retain path text handles after shortening curves

* test: account for layer translation in path placement drags

* fix: mark path text range with x and o markers on the path

The beginning marker is an x and the end a small circle, both on the
path, with a plus in the circle while the range hides glyphs. The
cursor's triangle points right over the beginning, left over the end,
and both ways over the text body, which moves the whole range.
Direct Selection leaves an anchor or handle under a marker to path
editing; Path Selection always takes the marker.

* fix: resolve coincident path text markers by lap or drag direction

The x and o markers coincide on a closed path's full lap and on an
empty or end-clamped open range. A full lap now moves the whole text;
otherwise the first motion picks the beginning (backward) or the end
(forward). Marker fixtures press on the path, where the markers now
sit.

* fix: let either end of a full-lap path text range be dragged

Text attached to a closed path fills one lap, so its x and o markers
coincide and every press moved the whole text, leaving no way to
shorten the range. As the text begins just ahead of that point and
ends just behind it, a press ahead along the path now grabs the
beginning and one behind grabs the end; the point itself still moves
the whole text.

* test: check full-lap marker drags do not flip the text

* fix: read and write the path text range in PSD

Type on a path keeps its range in the Txt2 frame as /2 /6 [start end],
in curve-segment units with -1 for the default. Three reference-editor
files in ag-psd's test set fix the mapping: text-path ends a third into
the first segment and draws only "so" of "some text", and
text-path-26/27 move the start on an open path.

Import reads both ends (and the flipped flag) into the layer's start and
end. Export writes an open path whole with its start and end in the
range, instead of cutting the path at the start, and a closed path's
limited end as a range from its start. Path text in a document that
never came from a PSD now gets a Txt2 block, so its path is saved at
all, and the warning that the end limit is lost is gone.

* fix: let both selection tools grab a path text marker on an anchor

Direct Selection gave an anchor under a marker the click, so an open
path's default markers (on its end anchors) and a closed path's
coincident full-lap markers (on its first anchor) could not be moved
with that tool. In the reference editor either selection tool drags a
marker wherever the pointer shows the text bar with a triangle, so the
marker now wins for both tools.

The Direct Selection tests for reshaping a type path (#9114) drag its
last anchor, where the default end marker sits; they now end the
range short of it. To reshape at an anchor under a marker, drag the
marker off it or select the anchor with a marquee and nudge it.

* fix: keep explicit and empty path text ranges through PSD

An explicit end at the path's end stays explicit, so centered and right type keeps its alignment within the span. A closed range whose ends meet reads as empty, not as a full lap.

* ci: re-run checks after a download outage

* ci: re-run checks after a download outage

* fix: preserve legacy path text anchors through PSD

* ci: re-run checks against current main

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-10 16:28:51 +01:00
rmsff 81639ef0a1 Test Object Selection's Indexed Color and Bitmap refusal 2026-11-10 18:25:49 +03:00
rmsff 67f865695e Object Selection: refuse Indexed Color and Bitmap documents
select.object (rectangle and point) returns the reference application's
alert text in these two modes and leaves the selection and History alone;
a click or drag with the tool opens that alert with OK instead of running.
2026-11-10 18:19:15 +03:00
rmsff 9106acf5d2 Test the Art History Brush colour mode refusal at 8 and 16 bits 2026-11-10 18:17:25 +03:00
rmsff 5989757980 Art History Brush: refuse a source of another colour mode
After Image > Mode the source state from before the change was converted
and painted; Photoshop refuses it. Compare the document modes, not the
pixel formats, which read Indexed and Multichannel as RGB. A bit depth
change still converts. The History Brush keeps its behaviour (#12842).
2026-11-10 18:17:25 +03:00
Dan 94c4eba813 docs: explain Freeform history contracts and regression fixtures 2026-11-10 14:59:11 +00:00
David Mann 4651f92874 Merge pull request #11711 from yoriswind/codex/move-selection-11102
Fix Move Auto-Select toggling and locked-layer clicks (#11102)
2026-11-10 15:51:07 +01:00
rmsff 587fd85295 Tests: cover splits of the Default warp grid (#12495) 2026-11-10 16:57:59 +03:00
rmsff 6279086a50 Warp: a one-way split on the Default grid keeps only the thirds across it
A horizontal split now turns the vertical thirds into anchor columns and drops the horizontal ones (3 x 2), a vertical split the mirror (2 x 3). Crosswise and splits of an already split grid are unchanged. The two tests that expected every third to stay now expect the cut in place of the dropped thirds.
2026-11-10 16:57:59 +03:00
terminalgateandClaude Sonnet 5.5 fb3b6a4b70 Eraser: add Erase to History (Brush, Pencil and Block modes) (#10692)
* 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>
2026-11-10 14:51:20 +01:00
Dan 9fd70a78be Merge remote-tracking branch 'origin/main' into codex/12829-freeform-history 2026-11-10 13:40:18 +00:00
David Mann 5705d4c9fa Merge pull request #12843 from rmsff/fix/red-eye-history-state-12573
Red Eye: name the step Red Eye Removal Tool and record a click that changes nothing
2026-11-10 14:21:39 +01:00
David Mann 9ec6a65aa7 Merge pull request #12819 from rmsff/fix/remove-new-layer-name-12542
Remove Tool: name the new layer "Remove tool edits"
2026-11-10 14:21:29 +01:00
David Mann 5dc18fa87b Merge pull request #12812 from rmsff/fix/dodge-refuses-indexed-12686
Dodge: refuse Indexed Color and Bitmap documents
2026-11-10 14:21:19 +01:00
David Mann 7f64c24195 Merge pull request #12811 from rmsff/fix/delete-last-anchor-12764
Delete Anchor Point: deleting a saved path's last anchor leaves it empty
2026-11-10 14:21:08 +01:00
David Mann 3466609441 Merge pull request #12809 from rmsff/fix/art-history-noop-state-12636
Art History Brush: a click held back by the tolerance adds its state
2026-11-10 14:20:58 +01:00
David Mann bd2d87f64d Merge pull request #12813 from rmsff/fix/convert-point-history-names-12736
Convert Point: name History steps Change Anchor Point and Corner Drag
2026-11-10 14:20:39 +01:00
Dan 70c8cdcac9 fix: name Freeform Pen stroke history after the tool 2026-11-10 12:47:46 +00:00
rmsff 2390a935ff Tests: Red Eye history states for hits, misses and refusals 2026-11-10 13:56:00 +03:00
rmsff 6106c825e7 Red Eye: name the step Red Eye Removal Tool and record a click that changes nothing
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.
2026-11-10 13:56:00 +03:00
Hector Villarreal 8257d890a9 Merge main into fix/mixer-load-solid-colors (picks up the fixed sampler and wand tests) 2026-11-10 04:37:57 -06:00
rmsff aa4ef1735c Test the Remove Tool new layer name 2026-11-10 13:14:42 +03:00
rmsff 829a8b8f51 Remove Tool: name the new layer "Remove tool edits"
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.
2026-11-10 13:14:42 +03:00
rmsff 35abce7773 Name Convert Point's History steps Change Anchor Point and Corner Drag
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.
2026-11-10 13:14:39 +03:00
rmsff bc3d366c4c Test the Dodge tool's Indexed Color and Bitmap refusal 2026-11-10 13:14:36 +03:00
rmsff 7188facf57 Refuse Dodge in Indexed Color and Bitmap documents
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.
2026-11-10 13:14:36 +03:00
rmsff 0610e89921 Test deleting the last anchor of a saved path 2026-11-10 13:14:33 +03:00
rmsff 7a77b42a35 Delete Anchor Point: deleting a saved path's last anchor leaves it empty
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.
2026-11-10 13:14:33 +03:00
rmsff c4296987d3 Test the Art History Brush state of a click held back by the tolerance 2026-11-10 13:14:30 +03:00
rmsff bdf1050f6f Art History Brush: a click held back by the tolerance adds its state
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.
2026-11-10 13:14:30 +03:00