forked from 1b-agent/opencadstudio-upstream
xref: leave the host's layer 0 and Defpoints unflagged on load
Since layer 0 and Defpoints map to the host's own layers, the loop that marks dependent layers flagged the host's layer 0 as xref-dependent and owned by the reference. Skip the layers that keep their name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
e357b02cd4
commit
a36e4e77d3
1 file changed
+5
-1
+5
-1
@@ -1244,7 +1244,11 @@ fn merge_xref_into_block(
|
|||||||
// Dependent layers and linetypes carry the xref flag and their owning
|
// Dependent layers and linetypes carry the xref flag and their owning
|
||||||
// reference, the way the file stores them; without it the host writes
|
// reference, the way the file stores them; without it the host writes
|
||||||
// plain records with a "|" in the name, which other readers reject.
|
// plain records with a "|" in the name, which other readers reject.
|
||||||
for name in maps.layers.values() {
|
// Layer 0 and Defpoints map to the host's own layers, which stay plain.
|
||||||
|
for (source, name) in &maps.layers {
|
||||||
|
if name.eq_ignore_ascii_case(source) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if let Some(layer) = doc.layers.get_mut(name) {
|
if let Some(layer) = doc.layers.get_mut(name) {
|
||||||
layer.flags.xref_dependent = true;
|
layer.flags.xref_dependent = true;
|
||||||
layer.xref_block_record_handle = br_handle;
|
layer.xref_block_record_handle = br_handle;
|
||||||
|
|||||||
Reference in new issue
Block a user