Merge pull request #865 from schoeller/panel-xdata

feat(properties): show XDATA records in Properties panel
This commit is contained in:
Hakan Seven authored and GitHub committed 2026-08-24 16:09:31 +03:00
commit 1fb770fb15
3 files changed
+27

No files matched your search

+25
View File
@@ -671,6 +671,31 @@ impl OpenCADStudio {
entity,
));
{
use crate::entities::common::ro_prop;
let xd = &source_entity.common().extended_data;
if !xd.is_empty() {
let mut xd_props = Vec::new();
for rec in xd.records() {
let value_text = rec
.values
.iter()
.map(|value| format!("{value:?}"))
.collect::<Vec<_>>()
.join(", ");
xd_props.push(ro_prop(
t!("Application").as_ref(),
"xdata_value",
format!("{}: {value_text}", rec.application_name),
));
}
sections.push(crate::scene::model::object::PropSection {
title: t!("Extended Data").into_owned(),
props: xd_props,
});
}
}
// Uniform-scale checkbox for block references (#427):
// while the three scale factors are equal (and the user
// hasn't opted into per-axis editing) the panel shows one