forked from 1b-agent/opencadstudio-upstream
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 <[email protected]>
This commit is contained in:
1 parent
f7dd9b403d
commit
6f14b53aff
1 file changed
+7
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user