From 6f14b53affb13847190aac451273fcbfb6f01b42 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Thu, 15 Oct 2026 04:46:13 +0300 Subject: [PATCH] dimstyle: New starts from the selected style New created a bare dimension style, whose defaults are inch-sized (0.18 arrows and text). In a metric drawing its arrows came out too small to see (#1675). It now starts from the selected style. Co-Authored-By: Claude Opus 5.5 --- src/app/style_ops.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/style_ops.rs b/src/app/style_ops.rs index 1cea49a71..dcd5a6ba9 100644 --- a/src/app/style_ops.rs +++ b/src/app/style_ops.rs @@ -714,7 +714,13 @@ impl OpenCADStudio { let i = self.active_tab; let name = self.unique_new_name(kind); let h = self.tabs[i].scene.document.allocate_handle(); - self.insert_default_style(kind, &name, h); + // A new dimension style starts from the selected one: the bare + // defaults are inch-sized, so in a metric drawing its arrows and gaps + // would come out too small to see. + let src = self.style_selected(kind); + if kind != StyleKind::Dim || !self.clone_style_as(kind, &src, &name, h) { + self.insert_default_style(kind, &name, h); + } self.set_style_selected(kind, name.clone()); self.load_style_bufs(kind); self.after_style_change(kind);