forked from 1b-agent/opencadstudio-upstream
Merge pull request #865 from schoeller/panel-xdata
feat(properties): show XDATA records in Properties panel
This commit is contained in:
3 files changed
+27
No files matched your search
@@ -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
|
||||
|
||||
@@ -1015,6 +1015,7 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
|
||||
"Ext line offset" => Some(("properties", "ext-line-offset")),
|
||||
"Ext line weight (DIMLWE)" => Some(("draw", "ext-line-weight-dimlwe")),
|
||||
"Extend" => Some(("modify", "extend")),
|
||||
"Extended Data" => Some(("properties", "extended-data")),
|
||||
"Extended Entity" => Some(("properties", "extended-entity")),
|
||||
"Extended Lighting" => Some(("properties", "extended-lighting")),
|
||||
"Extension" => Some(("common", "extension")),
|
||||
|
||||
Reference in new issue
Block a user