forked from 1b-agent/opencadstudio-upstream
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
07f25f4bca
commit
e682f29ce6
1 file changed
+5
-2
Vendored
+5
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user