From a17bc3d5f4581b72059f5fcf02bcaa614e440046 Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Mon, 4 Jan 2021 13:49:14 +0100 Subject: [PATCH] [ui] graph: minor code change for readability --- meshroom/ui/graph.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meshroom/ui/graph.py b/meshroom/ui/graph.py index 434e012748..73aed58ca3 100644 --- a/meshroom/ui/graph.py +++ b/meshroom/ui/graph.py @@ -524,9 +524,11 @@ def removeNodesFrom(self, startNode): startNode (Node): the node to start from. """ with self.groupedGraphModification("Remove Nodes from {}".format(startNode.name)): + nodes, _ = self._graph.dfsOnDiscover(startNodes=[startNode], reverse=True, dependenciesOnly=True) # Perform nodes removal from leaves to start node so that edges # can be re-created in correct order on redo. - [self.removeNode(node) for node in reversed(self._graph.dfsOnDiscover(startNodes=[startNode], reverse=True, dependenciesOnly=True)[0])] + for node in reversed(nodes): + self.removeNode(node) @Slot(Attribute, Attribute) def addEdge(self, src, dst):