Repository navigation
Done
Labels
bugSomething isn't working
Description
TL;DR: after Remove Background, the new layer mask should be the edit target, as after Add Layer Mask, not the layer's pixels.
What happens today (main 44f38f0)
- Test document: 800x600 RGB/8 with an opaque pixel layer "Photo" (white with a red 300x200 rectangle at 100,100).
- After
layer.removeBackgroundon "Photo" the mask is added, but the pixels stay targeted:document.inspectreportschannels.target{kind:"composite"}, the tab title reads(Photo, RGB/8)and the pixel thumbnail is framed. - The command never changes the channel target:
runincrates/engine-core/src/cmd/cutout_cmds.rs:50-89sets the mask and clears the selection only.
Reference application (measured)
- After Remove background the mask thumbnail of the layer is selected and the title bar reads
(Pixels, Layer Mask/8), so the next brush stroke edits the mask.
Not measured: what happens to the foreground/background colours when the target moves to the mask; they follow today's mask-target behaviour (the same as ui.set {maskTarget}).
Done when
- After Remove Background (Properties quick action or
layer.removeBackground) the layer's mask is the target:channels.targetnames the layer mask, the mask thumbnail is framed, the title showsLayer Mask. - Undo returns to the earlier target.
- A refused run (no subject, locked layer) leaves the target as it was.
Where
crates/engine-core/src/cmd/cutout_cmds.rs- New test file:
crates/engine-core/src/cmd/remove_background_mask_target_tests.rs
Related
- MISSING-FEATURE-TASK-BAR-LAYER-MASK #16753: the layer-mask task bar, which shows once a mask is targeted.
- fix(engine): allow Remove Background on unlocked smart objects #15926 (open PR): Remove Background on unlocked smart objects; does not change the target.
Rules for this item
- Part of EPIC-TASK-BAR #16748 (EPIC-TASK-BAR). Comment here when you take it and open a draft PR early that says
Fixes #<this issue>. - Put your tests in the new test file named above, and touch only the files under "Where".
- Cases marked not measured keep today's behaviour. Ask here instead of guessing.
- Don't edit
docs/ui-parity.mdor other parity docs. The epic updates them once for all items.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
qvest-ssels commentedon Dec 3, 2026
👀 Looking into this, and I may open a PR for it.
Screenshots for storytold#19673
Remove Background targets the layer mask it adds