feat(properties): dimension style-derived property groups

Resolve a dimension's DimStyle from the document and inject its full spec
groups — Lines & Arrows, Text, Fit, Primary Units, Alternate Units,
Tolerances — mirroring the ~80 dimension variables (dimasz, dimclrd, dimtxt,
dimdec, dimtol, dimzin bit flags, …) as read-only rows. The panel already had
doc access for the dim-style picker; extend it to append style_sections(style)
after the dimension's own Misc/Geometry groups.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-02 23:17:54 +03:00
1 parent f4c60a39a9
commit 1f2d543755
2 files changed
+177 -2

No files matched your search

+15 -2
View File
@@ -179,8 +179,8 @@ impl OpenCADStudio {
}
}
// Inject DimStyle picker for Dimension entities.
if let acadrust::EntityType::Dimension(_) = entity {
// Inject DimStyle picker + style-derived groups for Dimensions.
if let acadrust::EntityType::Dimension(d) = entity {
let dim_style_names: Vec<String> = self.tabs[i]
.scene
.document
@@ -208,6 +208,19 @@ impl OpenCADStudio {
}
}
}
// Append the resolved dimension style's groups
// (Lines & Arrows, Text, Fit, Units, Tolerances).
let style_name = d.base().style_name.clone();
if let Some(style) =
self.tabs[i].scene.document.dim_styles.iter().find(|s| {
s.name.eq_ignore_ascii_case(&style_name)
|| (style_name.trim().is_empty()
&& s.name.eq_ignore_ascii_case("Standard"))
})
{
sections.extend(crate::entities::dimension::style_sections(style));
}
}
// Block attributes: expose each attribute tag as an