[commands] remove unnecessary updates

* Core Graph is now updated  internally when needed
* addNewNode already calls applyExpr on newly created node
This commit is contained in:
Yann Lanthony 2017-10-30 16:39:11 +01:00
parent 5e4b26fa5e
commit 1ec966fe2c

View file

@ -79,7 +79,6 @@ class AddNodeCommand(GraphCommand):
def redoImpl(self):
self.node = self.graph.addNewNode(self.nodeType)
self.setText("Add Node {}".format(self.node.getName()))
self.node._applyExpr()
return True
def undoImpl(self):
@ -110,8 +109,6 @@ class RemoveNodeCommand(GraphCommand):
self.graph.addEdge(self.graph.attribute(srcAttr),
self.graph.attribute(dstAttr))
node.updateInternals()
class SetAttributeCommand(GraphCommand):
def __init__(self, graph, attribute, value, parent=None):