forked from 1b-agent/opencadstudio-upstream
feat(properties): label xref Insert as "External Reference"
Match AutoCAD properties panel — Insert whose block_record carries is_xref/is_xref_overlay now shows "External Reference" instead of "Block Reference". Silence dead_code warning on XrefStatus::Unloaded (intentional, awaiting on-disk Unload-bit detection). Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
1 parent
f713354de1
commit
f738a20457
2 files changed
+19
-1
No files matched your search
+18
-1
@@ -174,7 +174,24 @@ impl H7CAD {
|
||||
});
|
||||
}
|
||||
}
|
||||
let title = entity_type_label(entity);
|
||||
let title = match entity {
|
||||
acadrust::EntityType::Insert(ins) => {
|
||||
let is_xref = self.tabs[i]
|
||||
.scene
|
||||
.document
|
||||
.block_records
|
||||
.iter()
|
||||
.find(|br| br.name == ins.block_name)
|
||||
.map(|br| br.flags.is_xref || br.flags.is_xref_overlay)
|
||||
.unwrap_or(false);
|
||||
if is_xref {
|
||||
"External Reference".to_string()
|
||||
} else {
|
||||
entity_type_label(entity)
|
||||
}
|
||||
}
|
||||
_ => entity_type_label(entity),
|
||||
};
|
||||
ui::PropertiesPanel {
|
||||
choice_combos: sections
|
||||
.iter()
|
||||
|
||||
@@ -17,6 +17,7 @@ pub enum XrefStatus {
|
||||
NotFound,
|
||||
/// XRef is marked Unloaded in the host DWG — we honor that and
|
||||
/// skip resolving the external file. The user can re-load via UI.
|
||||
#[allow(dead_code)]
|
||||
Unloaded,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user