From e5974a8895ed35ef605c497d754465190af886bb Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Fri, 7 Aug 2026 11:10:42 +0300 Subject: [PATCH] fix(setvar): refresh geometry the variable is baked into LTSCALE scales the dash pattern baked into every wire, and PDMODE / PDSIZE decide the point glyph built at tessellation time. Each has its own command that invalidates for exactly that reason -- and PDMODE / PDSIZE are also reached from the point style dialog and the viewport setting, both of which invalidate too. Only SETVAR, the fourth way in, set the header and stopped there, so the drawing kept rendering the old value until some unrelated edit happened to rebuild it. Invalidate the same way each variable's own command does, alongside the TEXTFILL case already handled here. The rest of the SETVAR list needs nothing: FILLMODE is read at render time and hashed into viewport state, CELTSCALE and TEXTSIZE only seed new entities, SPLFRAME is never read outside this file, and the others are behaviour rather than geometry. Co-Authored-By: Claude Opus 5 --- src/app/commands/styleprops.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app/commands/styleprops.rs b/src/app/commands/styleprops.rs index a26becf59..721c1e227 100644 --- a/src/app/commands/styleprops.rs +++ b/src/app/commands/styleprops.rs @@ -1601,6 +1601,18 @@ impl OpenCADStudio { .scene .invalidate_text_geometry_dependencies(); } + // LTSCALE scales the dash pattern baked into every wire, and + // PDMODE / PDSIZE decide the point glyph built at tessellation + // time. Their own commands invalidate for exactly that reason; + // reaching the same variable through SETVAR has to do it too, + // or the drawing keeps rendering the old value until some + // unrelated edit happens to rebuild it. + if name == "LTSCALE" { + self.tabs[i].scene.bump_geometry(); + } + if name == "PDMODE" || name == "PDSIZE" { + self.tabs[i].scene.invalidate_point_dependencies(); + } // ORTHOMODE / OSMODE set the header directly; mirror them into // the live Ortho / running OSNAP so the constraint + status // bar follow and the save-time stamp doesn't revert them.