From d9858a7110fe24ecb92d4264796cd555b66b7b74 Mon Sep 17 00:00:00 2001 From: rmsff <17902130+rmsff@users.noreply.github.com> Date: Wed, 11 Nov 2026 04:44:31 +0300 Subject: [PATCH] Remove tool: a press on a type layer does nothing, with no rasterize prompt (#12553) The reference's Remove tool ignores a type layer: no prompt, no stroke overlay and no history state, and the layer stays type. Brush, Eraser and the other pixel tools keep the prompt there, and the Remove tool still asks on shape, Smart Object and fill layers. --- crates/ui-egui/src/dialogs/rasterize_prompt.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/dialogs/rasterize_prompt.rs b/crates/ui-egui/src/dialogs/rasterize_prompt.rs index c099f6b76e6..fa86cf5b2db 100644 --- a/crates/ui-egui/src/dialogs/rasterize_prompt.rs +++ b/crates/ui-egui/src/dialogs/rasterize_prompt.rs @@ -102,12 +102,17 @@ pub fn needed(app: &PhotocraftApp) -> Option<(Kind, photocraft_doc::LayerId)> { } /// A tool's pointer press: when it would paint a layer that must be rasterized first, park it -/// behind the prompt and return true (the tool must not see the press). +/// behind the prompt, or drop it (the Remove tool on a type layer), and return true (the tool +/// must not see the press). pub fn intercept(app: &mut PhotocraftApp, tool: Tool, x: f64, y: f64, pressure: f32) -> bool { if !paints_pixels(app, tool) { return false; } let Some((kind, layer)) = needed(app) else { return false }; + // The reference's Remove tool ignores a type layer: no prompt and no stroke (#12553). + if tool == Tool::Remove && kind == Kind::Type { + return true; + } if !app.ui.dialogs.iter().any(|d| owns(&d.fields)) { open(app, kind, layer, tool, [x, y, f64::from(pressure)]); }