From bc1734f59ef5ae59e0b44503390823d9153404dd Mon Sep 17 00:00:00 2001 From: Kristian Myram Date: Fri, 30 Oct 2026 03:56:25 +0100 Subject: [PATCH] #1284: remove remaining double-click paint helpers --- crates/engine/src/cmd/shape_stroke.rs | 4 +--- crates/ui-egui/src/panels/viewer/shapes.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/engine/src/cmd/shape_stroke.rs b/crates/engine/src/cmd/shape_stroke.rs index e81103cdf..ecd3ed8e0 100644 --- a/crates/engine/src/cmd/shape_stroke.rs +++ b/crates/engine/src/cmd/shape_stroke.rs @@ -216,12 +216,10 @@ pub fn first_paint(layer: &Layer, lt: Tick) -> (Option<[f64; 4]>, Option<[f64; 4 "fill" if fill.is_none() => fill = at("color").map(rgba), "stroke" if stroke.is_none() => { stroke = at("color").map(rgba); + width = at("width").map(|v| v.as_f64()); } _ => {} } - if width.is_none() && matches!(g.match_id.as_str(), "stroke" | "gstroke") { - width = at("width").map(|v| v.as_f64()); - } }); } (fill, stroke, width) diff --git a/crates/ui-egui/src/panels/viewer/shapes.rs b/crates/ui-egui/src/panels/viewer/shapes.rs index 1de85e46a..395219a05 100644 --- a/crates/ui-egui/src/panels/viewer/shapes.rs +++ b/crates/ui-egui/src/panels/viewer/shapes.rs @@ -78,7 +78,7 @@ pub(super) struct ShapeDrag { } /// The kind `tool` draws, as `shape.newShape` / `layer.addMask` name it. -pub(crate) fn shape_kind(tool: Tool) -> &'static str { +fn shape_kind(tool: Tool) -> &'static str { match tool { Tool::Rectangle => "rect", Tool::RoundedRect => "rounded",