fix(properties): stop block Attributes section rendering twice
A block reference's Attributes group was built in two places — the Insert entity's own properties() builder and an older panel injection left from the issue-192 attribute-editing work — so it appeared twice in the panel. Both produced identical AttrText rows (get_value() just returns &value). Drop the panel injection; the entity builder is the single source and also covers multi-select. Attribute edits still route by tag, unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
b5bee92335
commit
b4e3902d64
1 changed files with 0 additions and 24 deletions
|
|
@ -256,30 +256,6 @@ impl OpenCADStudio {
|
|||
}
|
||||
}
|
||||
|
||||
// Block attributes: expose each attribute tag as an
|
||||
// editable value row so a block reference's attributes can
|
||||
// be read and changed directly from the panel.
|
||||
if let acadrust::EntityType::Insert(ins) = entity {
|
||||
if !ins.attributes.is_empty() {
|
||||
let props = ins
|
||||
.attributes
|
||||
.iter()
|
||||
.map(|a| crate::scene::model::object::Property {
|
||||
label: a.tag.clone(),
|
||||
field: "attr",
|
||||
value: crate::scene::model::object::PropValue::AttrText {
|
||||
tag: a.tag.clone(),
|
||||
value: a.get_value().to_string(),
|
||||
},
|
||||
})
|
||||
.collect();
|
||||
sections.push(crate::scene::model::object::PropSection {
|
||||
title: "Attributes".to_string(),
|
||||
props,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// ── Doc-dependent property rows ──────────────────────────
|
||||
// Rows whose value lives on another object (a block record,
|
||||
// an underlay definition, a dimension / multileader style)
|
||||
|
|
|
|||
Loading…
Reference in a new issue