mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-09 21:07:20 +02:00
[commands] use addNewNode on RemoveNode.undo
use addNewNode to ensure node's internals are updated after creation
This commit is contained in:
parent
d2417e4ac6
commit
8c7a4bcc0f
1 changed files with 2 additions and 3 deletions
|
@ -113,9 +113,8 @@ class RemoveNodeCommand(GraphCommand):
|
|||
|
||||
def undoImpl(self):
|
||||
with GraphModification(self.graph):
|
||||
node = self.graph.addNode(Node(nodeDesc=self.nodeDict["nodeType"],
|
||||
**self.nodeDict["attributes"]
|
||||
), self.nodeName)
|
||||
node = self.graph.addNewNode(nodeDesc=self.nodeDict["nodeType"],
|
||||
name=self.nodeName, **self.nodeDict["attributes"])
|
||||
assert (node.getName() == self.nodeName)
|
||||
# recreate out edges deleted on node removal
|
||||
for dstAttr, srcAttr in self.outEdges.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue