fix(blocks): preserve UCS transformations

Bake BEDIT frames into block-local geometry while keeping model and viewport UCS isolated. Normalize legacy nonzero block origins during load.
This commit is contained in:
Hakan Seven committed 2026-07-30 19:50:33 +03:00
1 parent 02d15f5d23
commit 2c64888048
22 files changed
+693 -41

No files matched your search

+13 -1
View File
@@ -969,11 +969,23 @@ impl OpenCADStudio {
scene.reseed_derived_caches(handle);
}
if !final_changes.is_empty() {
scene.bump_entities(&final_changes);
if scene.changes_touch_block_definition(&final_changes) {
// A block-local delta changes the assembled definition
// consumed by every INSERT (including nested blocks).
// Replaying only the child handle leaves those cached
// references visually stale after BEDIT closes.
scene.bump_geometry();
} else {
scene.bump_entities(&final_changes);
}
}
}
scene.clear_preview_wire();
}
// UCS state is cached separately from its persisted header/viewport
// fields. History may just have restored those fields, so adopt them
// before drawing the icon/grid or accepting the next coordinate.
self.tabs[i].refresh_active_ucs();
self.tabs[i].active_cmd = None;
self.tabs[i].snap_result = None;
self.tabs[i].active_grip = None;