fix: force all nodes collapsed on file load

Prevents 512-element arrays from expanding on load and triggering
thousands of memory reads. Root nodes still show children via
isRootHeader override.
This commit is contained in:
IChooseYou
2026-03-14 06:05:53 -06:00
committed by IChooseYou
parent 7688bb5b92
commit 665138e688
2 changed files with 127 additions and 1 deletions

View File

@@ -289,7 +289,7 @@ struct Node {
n.isRelative = o["isRelative"].toBool(false);
n.arrayLen = qBound(1, o["arrayLen"].toInt(1), 1000000);
n.strLen = qBound(1, o["strLen"].toInt(64), 1000000);
n.collapsed = o["collapsed"].toBool(true);
n.collapsed = true; // Always load collapsed; user expands as needed
n.refId = o["refId"].toString("0").toULongLong();
n.elementKind = kindFromString(o["elementKind"].toString("UInt8"));
n.ptrDepth = qBound(0, o["ptrDepth"].toInt(0), 2);