From 496b2fe4dc2adf77831533bb3cf5afd0b647d2cb Mon Sep 17 00:00:00 2001 From: moppeeer Date: Thu, 22 Oct 2026 10:28:47 +0200 Subject: [PATCH] New Object Style: the selected object's corners as named corners With #1455's named style corners merged, the dialog seeds the style's corners from the selected item through `path_to_named`, so a frame whose path runs in another order gives each corner its own options. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/object_style_dialog.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/object_style_dialog.rs b/crates/ui-egui/src/object_style_dialog.rs index 9dc905b3c..1678a2dee 100644 --- a/crates/ui-egui/src/object_style_dialog.rs +++ b/crates/ui-egui/src/object_style_dialog.rs @@ -29,7 +29,8 @@ pub fn open_new(app: &mut DesignApp) { "basedOn": designcraft_doc::NO_OBJECT_STYLE, "fill": it.as_ref().map(|i| i.fill.clone()).unwrap_or_default(), "stroke": it.as_ref().map(|i| i.stroke.clone()).unwrap_or_default(), - "corners": it.as_ref().map(|i| i.corners).unwrap_or_default(), + // A style holds named corners (top left, top right, …), the item its path's. + "corners": it.as_ref().map(|i| i.corners.path_to_named(&i.path)).unwrap_or_default(), "fx": crate::effects_dialog::effects_json(&it.map(|i| i.effects).unwrap_or_default()), "hadEffects": from, "inc": {"fill": from, "stroke": from, "corners": from},