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]>
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.
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]>
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]>
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]>
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]>
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]>
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]>
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".
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.
#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
`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
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.
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
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.
* --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]>
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]>