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 <noreply@anthropic.com>
This commit is contained in:
parent
f713354de1
commit
f738a20457
2 changed files with 19 additions and 1 deletions
|
|
@ -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 {
|
ui::PropertiesPanel {
|
||||||
choice_combos: sections
|
choice_combos: sections
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ pub enum XrefStatus {
|
||||||
NotFound,
|
NotFound,
|
||||||
/// XRef is marked Unloaded in the host DWG — we honor that and
|
/// XRef is marked Unloaded in the host DWG — we honor that and
|
||||||
/// skip resolving the external file. The user can re-load via UI.
|
/// skip resolving the external file. The user can re-load via UI.
|
||||||
|
#[allow(dead_code)]
|
||||||
Unloaded,
|
Unloaded,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue