refactor(properties): entity property groups return Vec<PropSection>

Groundwork for making the Properties panel conform to the per-entity group/row
spec (PROPERTIES.md). The panel already renders a Vec of sections, but each
entity could only express a single geometry section.

Change PropertyEditable::geometry_properties (and the EntityTypeOps enum
dispatch) to return Vec<PropSection>, update the two impl macros, and flatten
in properties_sectioned so the panel shows [General] + the entity's groups.
Every entity builder is wrapped to return its existing section as a one-element
Vec — pure mechanical change, no rows or titles altered, panel output identical.

Enables Phase 2: rewriting each entity's groups/rows to match the spec.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-02 22:46:19 +03:00
1 parent 8164e14a19
commit b2b2bfb246
31 files changed
+147 -139

No files matched your search

+9 -9
View File
@@ -84,14 +84,14 @@ impl Grippable for Solid3D {
}
impl PropertyEditable for Solid3D {
fn geometry_properties(&self, _text_style_names: &[String]) -> PropSection {
fn geometry_properties(&self, _text_style_names: &[String]) -> Vec<PropSection> {
let size = acis_size_str(
self.acis_data.has_data(),
self.acis_data.sat_data.len(),
self.acis_data.sab_data.len(),
self.acis_data.is_binary,
);
PropSection {
vec![PropSection {
title: "Geometry".into(),
props: vec![
ro(
@@ -133,7 +133,7 @@ impl PropertyEditable for Solid3D {
},
),
],
}
}]
}
fn apply_geom_prop(&mut self, _field: &str, _value: &str) {}
@@ -160,14 +160,14 @@ impl Grippable for Region {
}
impl PropertyEditable for Region {
fn geometry_properties(&self, _text_style_names: &[String]) -> PropSection {
fn geometry_properties(&self, _text_style_names: &[String]) -> Vec<PropSection> {
let size = acis_size_str(
self.acis_data.has_data(),
self.acis_data.sat_data.len(),
self.acis_data.sab_data.len(),
self.acis_data.is_binary,
);
PropSection {
vec![PropSection {
title: "Geometry".into(),
props: vec![
ro(
@@ -201,7 +201,7 @@ impl PropertyEditable for Region {
self.silhouettes.len().to_string(),
),
],
}
}]
}
fn apply_geom_prop(&mut self, _field: &str, _value: &str) {}
@@ -228,14 +228,14 @@ impl Grippable for Body {
}
impl PropertyEditable for Body {
fn geometry_properties(&self, _text_style_names: &[String]) -> PropSection {
fn geometry_properties(&self, _text_style_names: &[String]) -> Vec<PropSection> {
let size = acis_size_str(
self.acis_data.has_data(),
self.acis_data.sat_data.len(),
self.acis_data.sab_data.len(),
self.acis_data.is_binary,
);
PropSection {
vec![PropSection {
title: "Geometry".into(),
props: vec![
ro(
@@ -269,7 +269,7 @@ impl PropertyEditable for Body {
self.silhouettes.len().to_string(),
),
],
}
}]
}
fn apply_geom_prop(&mut self, _field: &str, _value: &str) {}