fix(xref): preserve layer-zero colors

Treat namespaced XREF layer |0 as layer zero during block inheritance so ByLayer geometry keeps its source color.\n\nCloses #437
This commit is contained in:
Hakan Seven committed 2026-07-24 18:43:04 +03:00
1 parent a0558e187c
commit 7a1c0ead0d
5 files changed
+32 -14

No files matched your search

+4 -2
View File
@@ -756,7 +756,8 @@ pub(crate) fn tessellate_entity(
// they should inherit from the Dimension entity.
let sub_color_is_byblock =
sub.common().color == acadrust::types::Color::ByBlock;
let sub_is_l0_bylayer = sub.common().layer == "0"
let sub_is_l0_bylayer =
view::render::is_effective_layer_zero(&sub.common().layer)
&& sub.common().color == acadrust::types::Color::ByLayer;
let sub_wires = tessellate_entity(
document,
@@ -909,7 +910,8 @@ pub(crate) fn tessellate_entity(
};
let sub_color_is_byblock =
sub.common().color == acadrust::types::Color::ByBlock;
let sub_is_l0_bylayer = sub.common().layer == "0"
let sub_is_l0_bylayer =
view::render::is_effective_layer_zero(&sub.common().layer)
&& sub.common().color == acadrust::types::Color::ByLayer;
let mut placed = sub.clone();
{