forked from 1b-agent/opencadstudio-upstream
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 <[email protected]>
This commit is contained in:
1 parent
6752df6ea4
commit
e5974a8895
1 file changed
+12
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user