From bc92590725cb76792990b41335c82d44e2fa5d2f Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sun, 14 Jun 2026 00:36:17 +0300 Subject: [PATCH] fix(stretch): re-tessellate stretched entities so the viewport updates (#95) STRETCH edited geometry directly via document.get_entity_mut, which the scene's tessellation cache doesn't observe, so the viewport kept showing the pre-stretch shape until an unrelated redraw. Mark each stretched entity dirty and bump geometry on completion, matching MOVE's transform_entities path. Co-Authored-By: Claude Opus 4.8 --- src/app/cmd_result.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/cmd_result.rs b/src/app/cmd_result.rs index 5bcf660fd..ce590d73e 100644 --- a/src/app/cmd_result.rs +++ b/src/app/cmd_result.rs @@ -1118,10 +1118,18 @@ impl OpenCADStudio { } } if stretched { + self.tabs[i].scene.mark_entity_dirty(*handle); count += 1; } } + // Geometry was edited in place via get_entity_mut, which the + // scene's tessellation cache doesn't observe. Re-tessellate the + // moved entities so the viewport reflects the stretch right away + // instead of only on the next unrelated redraw. See #95. + if count > 0 { + self.tabs[i].scene.bump_geometry_no_blocks(); + } self.tabs[i].dirty = true; self.tabs[i].active_cmd = None; self.tabs[i].snap_result = None;