perf(scene): make geometry edits incremental

Avoid full document, cache, and GPU rebuilds for entity deltas so add, delete, history, selection, and live polyline edits stay responsive on large drawings.
This commit is contained in:
Hakan Seven 2026-07-28 17:16:27 +03:00
commit 05b044f367
32 changed files with 1929 additions and 509 deletions

View file

@ -129,9 +129,14 @@ impl OpenCADStudio {
self.push_undo_snapshot(i, "LAYER COLOR");
self.tabs[i].dirty = true;
// By-layer colour is baked into every wire on
// this layer — re-tessellate so they repaint
// immediately (issue #231 class).
self.tabs[i].scene.bump_geometry();
// this layer. The dependency index maps block
// children back to their top-level INSERTs, so
// unrelated entities stay warm.
self.tabs[i]
.scene
.invalidate_layer_dependencies(std::slice::from_ref(
&layer_name,
));
self.command_line.push_output(&format!(
"LAYER: '{}' color set to ACI {}.",
layer_name, idx