From e682f29ce60be044e9d9cf2dbbd3ba6b62ef2568 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Tue, 29 Sep 2026 14:01:56 +0300 Subject: [PATCH] fix(render): block text no longer hides behind its own background box Inside a block, text-bearing and wide wires got their child rank as a depth override, but fill-only wires stayed at the bare insert level. A dimension's baked MTEXT with a DIMTFILL background therefore drew its box in front of its own text whenever the text's rank fell below zero: cyan boxes with no numbers. Fill-only wires now take the rank as well, so a background ties with its text and the text pass wins. Refs #774 Co-Authored-By: Claude Opus 5.5 --- src/scene/cache/block_cache.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scene/cache/block_cache.rs b/src/scene/cache/block_cache.rs index f72740a81..24abd04ab 100644 --- a/src/scene/cache/block_cache.rs +++ b/src/scene/cache/block_cache.rs @@ -2613,8 +2613,11 @@ fn emit_wire( // composed rank the text sits at the bare insert level, an exact tie with // every sibling fill, and the later wipeout pass erases it (unselected // block text vanished under its wipeout; selecting won only because the - // xray pass ignores depth). - let local_depth = (lw.world_width > 0.0 || !lw.text_verts.is_empty()) + // xray pass ignores depth). Fill-only wires take the rank as well: an + // MTEXT background (a dimension's DIMTFILL box) left at the bare insert + // level sat in front of its own text whenever that text's rank was + // below zero. + let local_depth = (lw.world_width > 0.0 || lw.is_fill_only || !lw.text_verts.is_empty()) .then(|| d_range.0 + lw.local_rank * d_range.1); let plot_visible = ctx.plot_visible && lw.plot_visible