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:
parent
8164e14a19
commit
b2b2bfb246
31 changed files with 147 additions and 139 deletions
|
|
@ -188,13 +188,13 @@ impl Grippable for MLine {
|
|||
}
|
||||
|
||||
impl PropertyEditable for MLine {
|
||||
fn geometry_properties(&self, _text_style_names: &[String]) -> PropSection {
|
||||
fn geometry_properties(&self, _text_style_names: &[String]) -> Vec<PropSection> {
|
||||
let just_str = match self.justification {
|
||||
acadrust::entities::MLineJustification::Top => "Top",
|
||||
acadrust::entities::MLineJustification::Zero => "Zero",
|
||||
acadrust::entities::MLineJustification::Bottom => "Bottom",
|
||||
};
|
||||
PropSection {
|
||||
vec![PropSection {
|
||||
title: "Geometry".into(),
|
||||
props: vec![
|
||||
ro("Style", "ml_style", self.style_name.clone()),
|
||||
|
|
@ -233,7 +233,7 @@ impl PropertyEditable for MLine {
|
|||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
fn apply_geom_prop(&mut self, field: &str, value: &str) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue