fix: clear collections in setScene and apply cloned collections in test button

- setScene now clears collections to avoid stale references
- Test clone button applies cloned collections after setScene

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
John Doe
2026-03-25 22:33:07 -04:00
co-authored by factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent de9eb6fa78
commit a87fe56d53
2 changed files with 31 additions and 2 deletions
+1
View File
@@ -136,6 +136,7 @@ const useScene: UseSceneStore = create<SceneState>()(
nodes: patchedNodes,
rootNodeIds,
dirtyNodes: new Set<AnyNodeId>(),
collections: {},
})
// Mark all nodes as dirty to trigger re-validation
Object.values(patchedNodes).forEach((node) => {