From 706f09cc960dba8f907ce283fe4a0daba230039e Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:24:27 +0700 Subject: [PATCH] fix(engine): document the magicEraser layer target Corpus on 6f5615f74 failed one remaining engine test: `named_layers_resolve_identically_for_painting_and_component_restoration`. The command already resolves `layer` through `active_pixel_layer`, but the params doc omitted it, so dispatch rejected a named-layer erase. Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com> --- crates/engine/src/cmd/eraser_cmds.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/eraser_cmds.rs b/crates/engine/src/cmd/eraser_cmds.rs index 4887228dfc..6d4680ca29 100644 --- a/crates/engine/src/cmd/eraser_cmds.rs +++ b/crates/engine/src/cmd/eraser_cmds.rs @@ -313,7 +313,7 @@ pub fn specs() -> Vec { label: "Magic Eraser", menu: &[], shortcut: None, - params: r##"{"x":px,"y":px,"tolerance":0..255=32,"antiAlias":bool=true,"contiguous":bool=true,"sampleAllLayers":bool=false,"opacity":1..100=100} (one undo step; a click off the canvas erases nothing and records no step; refused with the tool's alert and nothing changes: an Indexed Color document answers "Could not use the magic eraser because it does not work with Indexed Color images (convert image to RGB Color mode to edit).", a Bitmap document "Could not use the magic eraser because it does not work with Bitmap images (convert image to Grayscale mode to edit)."; Duotone and Multichannel erase as before)"##, + params: r##"{"x":px,"y":px,"tolerance":0..255=32,"antiAlias":bool=true,"contiguous":bool=true,"sampleAllLayers":bool=false,"opacity":1..100=100,"layer":id|name? (the layer to erase; default active)} (one undo step; a click off the canvas erases nothing and records no step; refused with the tool's alert and nothing changes: an Indexed Color document answers "Could not use the magic eraser because it does not work with Indexed Color images (convert image to RGB Color mode to edit).", a Bitmap document "Could not use the magic eraser because it does not work with Bitmap images (convert image to Grayscale mode to edit)."; Duotone and Multichannel erase as before)"##, enabled: has_pixel_layer, run: magic_eraser, journal: true,