cache: use disk states to share caches
This commit is contained in:
@@ -90,7 +90,11 @@ ProjectSerializer220403::LoadData ProjectSerializer220403::Load(Project *project
|
||||
qWarning() << "Failed to find node with ID" << id;
|
||||
reader->skipCurrentElement();
|
||||
} else {
|
||||
// Disable cache while node is being loaded (we'll re-enable it later)
|
||||
node->SetCachesEnabled(false);
|
||||
|
||||
LoadNode(node, xml_node_data, reader);
|
||||
|
||||
node->setParent(project);
|
||||
}
|
||||
}
|
||||
@@ -312,6 +316,11 @@ ProjectSerializer220403::LoadData ProjectSerializer220403::Load(Project *project
|
||||
}
|
||||
}
|
||||
|
||||
// Re-enable caches
|
||||
for (Node *n : project->nodes()) {
|
||||
n->SetCachesEnabled(true);
|
||||
}
|
||||
|
||||
return load_data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user