added project open save new

This commit is contained in:
megablocks(tm)
2026-02-07 11:27:46 -07:00
committed by sysadmin
parent 9ec06d9658
commit 39cac316de
12 changed files with 1266 additions and 92 deletions

View File

@@ -384,7 +384,7 @@ void composeNode(ComposeState& state, const NodeTree& tree,
} // anonymous namespace
ComposeResult compose(const NodeTree& tree, const Provider& prov) {
ComposeResult compose(const NodeTree& tree, const Provider& prov, uint64_t viewRootId) {
ComposeState state;
// Precompute parent→children map
@@ -504,6 +504,12 @@ ComposeResult compose(const NodeTree& tree, const Provider& prov) {
});
for (int idx : roots) {
// If viewRootId is set, skip roots that don't match
if (viewRootId != 0 && tree.nodes[idx].id != viewRootId)
continue;
// Skip collapsed roots unless specifically targeted by viewRootId
if (viewRootId == 0 && tree.nodes[idx].collapsed)
continue;
composeNode(state, tree, prov, idx, 0);
}