EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
#1284: remove remaining double-click paint helpers
Kristian Myrambc1734f59ef5
diff --git a/crates/engine/src/cmd/shape_stroke.rs b/crates/engine/src/cmd/shape_stroke.rsindex 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.rsindex 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",