From f592c5f1a2b1995dfdb86332b79edc5ca435d51f Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Fri, 15 May 2026 21:07:01 +0300 Subject: [PATCH] fix(scene): skip Block/BlockEnd sentinels in wires_for_block filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Block and BlockEnd are block-defn markers, not drawable geometry. wires_for_block did not filter them, so they fell through to legacy_geometry's `_` arm and emitted a 1-unit phantom horizontal segment at world_offset. The phantom was invisible on a real drawing but selectable and — worse — its points poisoned fit_all, contributing to the "ZOOM EXTENTS shrinks the model" symptom on files with weak EXTMIN/EXTMAX or with block-defn entities leaking into MSPACE. Same skip already exists in commands.rs:5364 and block_cache.rs:271 — the render path was the missing one. Co-Authored-By: Claude Opus 4.7 --- src/scene/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/scene/mod.rs b/src/scene/mod.rs index 19d3bbb62..9e51e2153 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -1012,6 +1012,13 @@ impl Scene { if c.invisible { return false; } + // Block/BlockEnd are block-defn sentinels, not drawable geometry. + // Without this skip they fall through to legacy_geometry's `_` + // arm and emit a 1-unit phantom segment at world_offset that + // poisons fit_all and shows up in selection. + if matches!(e, EntityType::Block(_) | EntityType::BlockEnd(_)) { + return false; + } if self .document .layers