[core] Graph: add missing GraphModification

In `initFromTemplate`, ensure that Publish nodes removal are grouped
under the same graph modification to trigger updates only once.
This commit is contained in:
Yann Lanthony 2025-02-06 16:46:05 +01:00
parent 25094ac877
commit 724e7fb387

View file

@ -258,6 +258,7 @@ class Graph(BaseObject):
self._deserialize(Graph._loadGraphData(filepath))
if not publishOutputs:
with GraphModification(self):
for node in [node for node in self.nodes if node.nodeType == "Publish"]:
self.removeNode(node.name)