Commit Graph
315 Commits
Author SHA1 Message Date
David Mann 9597153aea Merge #17561 into the merge queue batch
Painting symmetry turns off when its path is deleted, and undo restores it (#17384)
2026-11-29 11:23:23 +01:00
David Mann c4b29ba338 Merge #17523 into the merge queue batch
Frame from Layers frames a hidden layer instead of refusing it as empty (#17330)
2026-11-29 09:50:24 +01:00
David Mann c1c85c8962 Merge #17474 into the merge queue batch
Layers: a row's rename, colour and hide history steps take the reference names (#17364)
2026-11-29 04:41:29 +01:00
David Mann 191aa8d8e1 Merge #16000 into the merge queue batch
Duplicate Layers: one block of copies across groups and unbased clips (#14631)
2026-11-29 04:41:28 +01:00
David Mann d92e93d307 Merge #16571 into the merge queue batch
Image Mode: 32 Bits/Channel tags a linear ICC profile so PNG and EXR exports keep their colour
2026-11-29 04:41:26 +01:00
David Mann 9f98848bfe Merge #15398 into the merge queue batch
Place Embedded: with an open group active, the placed layer goes above the group (#14108)
2026-11-29 04:41:24 +01:00
David Mann 0ea5307093 Merge #15201 into the merge queue batch
Layers to Files: one file per layer inside a group, none for the group
2026-11-29 04:41:24 +01:00
David Mann 94df726d34 Merge #14562 into the merge queue batch
Artboard from Group: the history step is named Artboard From Layer Group (#14550)
2026-11-29 04:41:23 +01:00
kubuntugamerandCodebuff d9f1c83309 fix(engine): use the reference History names for a layer row's rename, colour and hide (#17364)
Rename Layer, Layer Color and Hide Layer now read "Name Change", "Color Change"
and "Layer Visibility" in the History panel, as the reference application's
row rename, Colour menu and Hide item do. Showing a hidden layer keeps its
current name, which the issue leaves unmeasured.

Co-Authored-By: Codebuff <[email protected]>
2026-11-28 20:00:50 -06:00
kubuntugamer 094de7055a test(engine): two hidden layers frame into one visible smart object (#17330)
The measured rule is that a frame shows what it frames, not that exactly one
hidden layer may be framed. Two hidden layers used to be refused as empty;
they now frame into one visible smart object holding both.
2026-11-28 19:19:40 -06:00
kubuntugamerandCodebuff 312c7cbf71 fix(engine): turn symmetry off when the work path is deleted by any alias (#17384)
path.delete treats "work", "" and "Work Path" as the work path, while
symmetry stores its source as "work", so deleting it as "Work Path" or ""
left symmetry mirroring a path that no longer exists. Normalise the
deleted name before comparing it with the symmetry's source.

Co-Authored-By: Codebuff <[email protected]>
2026-11-28 19:15:56 -06:00
kubuntugamerandCodebuff d973ce2bf6 fix(engine): Frame from Layers frames a hidden layer (#17330)
The frame renders the layers it takes in as visible when every one of them
is hidden, so a hidden layer becomes the frame's smart object instead of
failing with "the layer is empty, so there is nothing to convert". A
selection that also holds a visible layer keeps its hidden layers hidden,
as Convert to Smart Object does. A locked layer keeps working and its
content comes out unlocked, as the reference does.

Co-Authored-By: Codebuff <[email protected]>
2026-11-28 19:09:05 -06:00
kubuntugamerandCodebuff 01286848e5 fix(engine): turn symmetry off when its path is deleted, and restore it on undo (#17384)
Painting symmetry sampled a copy of its source path, so deleting that path left
symmetry mirroring across a path that no longer exists. Delete Path now turns
it off and keeps it for the step, so undo brings back both the path and the
symmetry and redo turns it off again. Deleting another path, or any path
while a preset symmetry is active, changes nothing.

Co-Authored-By: Codebuff <[email protected]>
2026-11-28 18:57:13 -06:00
David MannandClaude Opus 5.5 008aee718e Layers to Files groups test: the hidden group's Inner file shows Inner's pixels
Inner is painted red over the canvas, and the visibleOnly:false export of a
hidden Grp must decode to red pixels, not only the right size (CodeRabbit
review on #15201).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 00:52:59 +01:00
David Mann b7dbd65cdf Merge #17450 into the merge queue batch
Layers: Background from Layer's History state reads "Convert to Background" (#17305)
2026-11-29 00:52:21 +01:00
David Mann eec600b5bf Merge #17427 into the merge queue batch
fix(layers): count new layer names up from the highest Layer N (#17366)
2026-11-29 00:52:20 +01:00
David Mann 75314a5d4f Merge #15274 into the merge queue batch
fix: no Frame tool frames in Bitmap and Indexed Color (#13886)
2026-11-29 00:52:18 +01:00
David Mann 7a76a70a01 Merge #15396 into the merge queue batch
Photomerge: one History step and the reference's targeted layers (#14094)
2026-11-29 00:52:17 +01:00
David Mann ff2668e509 Merge #14066 into the merge queue batch
New Document: Don't Color Manage in the Color Profile list (#14032)
2026-11-29 00:52:17 +01:00
David MannandClaude Opus 5.5 2c52a8eba6 Merge storytold/photocraft main (d3b040392) into fix/layers-to-files-groups
The engine moved to crates/engine-core, so the group walk is ported onto
its export.rs and kept together with main's later Layers to Files changes
(Include ICC Profile, dashes in PNG names, the Background-only alert). The
group tests use crate::session() and the PNG dash names. The MCP tool
description no longer says groups export merged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 00:37:50 +01:00
David MannandClaude Opus 5.5 90c3a5a4fa Place group stacking tests: fill the Paint layer directly, since edit.fill moved to the paint crate
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 00:37:09 +01:00
David Mann 179f78f6a4 Merge remote-tracking branch 'origin/main' into fix/15398-merge
# Conflicts:
#	crates/engine-core/src/cmd/file_cmds.rs
2026-11-29 00:37:08 +01:00
a441f4bdd0 Fix #14562 test for today's main: ActionStep and crate::session()
After the merge of main the new test file no longer compiled (Action::new
takes ActionStep values now) and its session had no commands installed
(Session::new() gives NotInstalled; the sibling tests use crate::session()).

Co-Authored-By: TrevorBrown-dev <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-28 23:40:30 +01:00
David Mann c4ed62566d Merge remote-tracking branch 'origin/main' into pr-15274 2026-11-28 22:37:05 +01:00
RickiNano ef6ff54fdd New Document: Don't Color Manage in the Color Profile list (#14032)
The hosted New Document dialog passes unmanaged_profile("none"), so
Color Profile lists Don't Color Manage second in every colour mode and
keeps it across a mode change (storytold/craft-libs#2262). Create sends
file.new's profile: "none", an untagged document; the file.new params
text names it.

The test picks the entry on the installed dialog, switches to CMYK and
creates: the document is CMYK and untagged, and the recent settings
carry profile: "none".
2026-11-28 22:35:25 +01:00
David Mann 38139431b3 Merge branch 'main' into fix/artboard-from-group-history-name-14550 (merge queue)
# Conflicts:
#	crates/engine-core/src/cmd/artboard_cmds.rs
#	crates/engine-core/src/cmd/artboard_cmds/from_group_history_name_tests.rs
2026-11-28 22:32:24 +01:00
David Mann 5395eae757 Merge #17434 into the merge queue batch
Select Data Points: require at least one point
2026-11-28 22:27:16 +01:00
David Mann df4bdd15ac Merge #17420 into the merge queue batch
fix(engine): Collapse All Groups becomes one history step (#17363)
2026-11-28 22:27:14 +01:00
David Mann 212196207a Merge #17421 into the merge queue batch
fix(engine-core): Ungroup Layers selects all former children (#17362)
2026-11-28 22:27:14 +01:00
hnoerenberg b14cebb195 fix(engine): "Convert to Background" history step (#17305)
The reference application names the single History state that Layer > New >
Background from Layer adds "Convert to Background", so `background_from_layer`
now passes that name to `Session::edit`; the command label reads "Background
from Layer" like the menu row in `crates/ui-egui/src/menu_catalog.rs`. Pixels,
stacking, refusal cases and undo/redo are untouched.

New integration tests in crates/engine/tests/it/background_from_layer_history_name.rs
drive the command headless: one new state, its name, undo/redo keeping it, and
the opposite conversion's "Make Layer" state next door still intact.
2026-11-28 20:39:40 +01:00
hnoerenberg f6fa121cd2 fix(layers): keep group-nested names out of the Layer N counter
#17366 marks numbered layers inside groups as not measured, and an
unmeasured case keeps today's behaviour: with a group holding "Layer 7"
the suggestion is "Layer 1" today, but the first cut of
`next_layer_suggestion` counted every layer and lifted it to
"Layer 8". The counter now reads top-level names only, the reading
#14821 chose for the Layer from Background search, pinned by
`a_numbered_layer_inside_a_group_does_not_count`.

Fixes #17366
2026-11-28 20:22:43 +01:00
Dan 3dc3af95c7 Exercise Select Data Points with an open document 2026-11-28 18:31:26 +00:00
Dan de4c7ee78d Select Data Points: require at least one point (#17406) 2026-11-28 18:19:04 +00:00
hnoerenberg 2025c854d2 fix(layers): count new layer names up from the highest Layer N (#17366)
`layer.new.layer` without a name and the New Layer dialog took the first
free "Layer N", so a document holding "Layer 7" was offered "Layer 1"
again. `Document::next_layer_suggestion` names one above the highest
exact "Layer <number>" name, 1 when none exists; the command default and
the dialog prefill share that one helper, so an empty or spaces-only
Name gets the name the dialog showed. The other callers of
`next_layer_name` (groups, shapes, Layer from Background) keep the
first-free rule.

Fixes #17366
2026-11-28 19:11:26 +01:00
hnoerenberg e29b573919 fix(engine): Collapse All Groups leaves one history step
The Layers panel's Collapse All Groups runs layer.setExpanded with
{all: true, expanded: false} and no layer. The whole command was treated
as a view change, so closing every group left nothing for Edit > Undo;
Photoshop records one "Collapse All Groups" step for it. The layer-less
close-all now goes through Session::edit with that label, so one undo
reopens the groups that were open. A single or row-addressed toggle,
the open-all form and a close-all over an already-closed tree keep
today's no-step view change.
2026-11-28 18:50:32 +01:00
hnoerenberg 1cbd6afd3b fix(engine-core): Ungroup Layers selects every former child, topmost active
layer.ungroupLayers left only the topmost former child selected: the edit set
the active layer while the selection still named the removed group, so
fix_selection collapsed it to that one layer. Ungroup now makes every former
direct child the selection with the topmost one active (measured reference row),
the same reselect path Group Layers uses; ungrouping an empty group keeps
today's fallback target. Tests in the new engine integration file cover the
plain group, replacing a selection that held a second layer, a group
holding a group (one level up), and undo restoring the group and the
previous selection.

Fixes #17362
2026-11-28 18:46:36 +01:00
David Mann 7710791252 Merge #17303 into the merge queue batch
Embed working color profiles in untagged exports
2026-11-28 18:19:15 +01:00
yoriswind 41d9c33a22 Format the export profile preflight 2026-11-28 07:56:39 -08:00
yoriswind 5f9ae763c7 Refuse profile reads before committing floating selections 2026-11-28 07:45:53 -08:00
yoriswind 11285de79c Apply export regression formatting 2026-11-28 07:36:32 -08:00
yoriswind a058b21f3e Embed working profiles in untagged exports 2026-11-28 07:16:47 -08:00
David Mann e9fd539305 Merge #15063 into the merge queue batch
engine: name a duplicated new document Untitled-N (#14608)
2026-11-28 15:00:04 +01:00
Madhav Agarwal ddc23e259e Merge main into fix/14608-duplicate-layer-untitled-name 2026-11-28 18:26:44 +05:30
David Mann 6e5c3b4006 Merge #16646 into the merge queue batch
Apply Image: Source document dropdown, Target line, same bit depth only
2026-11-28 13:29:01 +01:00
David Mann bc82f013e5 Merge #16402 into the merge queue batch
Line tool: W and H fields for the active line's length and thickness
2026-11-28 12:04:01 +01:00
qvest-ssels 44bc6343aa Merge main into feat/apply-image-source-document-14480
dialogs.rs: kept the Source document rows and derive next to main's Mask group (#14489); both use main's shared apply_image_documents, layer and channel helpers.
2026-11-28 10:03:32 +01:00
qvest-ssels cd9c4a3789 cargo fmt 2026-11-28 09:36:29 +01:00
Gert Pellin - GPEandFredApps 391cb01710 --version: name the commit of a dev build from git (#5247) (#5300)
* --version: name the commit of a dev build from git (#5247)

A plain cargo build reported only '0.8.2 (dev build)'. The desktop and
CLI build scripts now read the checkout's commit (git rev-parse HEAD,
rerun when HEAD moves) and the binaries hand it to build_info at start,
giving '0.8.2 (dev build, 6f8505421)'. Release builds keep
PHOTOCRAFT_BUILD_SHA and their format; without git, or when the
workspace isn't the root of the checkout (a source tarball unpacked in
another repository), it stays '(dev build)'. The engine itself still
doesn't shell out, so a commit doesn't rebuild it.

* --version: only watch git paths that exist (#5247)

Cargo treats a missing rerun-if-changed path as always changed: it re-ran
the build script and recompiled photocraft and photocraft-cli on every
build when packed-refs (or the branch's loose ref) did not exist. Watch
HEAD and packed-refs only when present, and for a packed branch the
nearest existing directory under refs/, so the first commit on it, which
writes the loose ref, still triggers a rebuild.

* --version: watch an unborn branch and reftable checkouts (#5247)

The git paths are now registered before asking for the commit, so the first
commit on an unborn branch re-runs the build script. A reftable checkout
watches reftable/tables.list, which every ref update rewrites, instead of a
loose ref or packed-refs.

* --version: git fixtures ignore the caller's repository and ref format (#5247)

The test fixtures run git without GIT_DIR, GIT_WORK_TREE, GIT_COMMON_DIR,
GIT_INDEX_FILE and GIT_DEFAULT_REF_FORMAT, and the files-format fixtures pass
init.defaultRefFormat=files, so a reftable default or an inherited GIT_DIR
can't move or reshape them.

* --version: the git fixtures join the app's tests/it binary (#5247)

Main builds each crate's integration tests as one binary. The desktop
--version test now hands the checkout's commit to build_info as the
binary does, so both print the same dev build string.

---------

Co-authored-by: FredApps <[email protected]>
2026-11-28 08:11:58 +01:00
MaheshDesu 6774fe3cc0 test(engine): run the Frame mode tests on the split engine crates (#13886)
engine-core's Session::new() does not install commands, so the mode tests start from the crate's own session() helper. PhotocraftApp::new returns a boxed app after the engine split, so app_with_mode returns Box<PhotocraftApp> like app().

Signed-off-by: MaheshDesu <[email protected]>
2026-11-28 11:38:46 +05:30
MaheshDesu 759f088deb fix(engine): expose a command's job-conflict reason (#13886)
Signed-off-by: MaheshDesu <[email protected]>
2026-11-28 09:48:48 +05:30