[core] Graph: avoid double update while adding/removing an edge

Graph.markNodesDirty() is called in three different places:
- Attribute.requestGraphUpdate()
- Graph.addEdge()
- Graph.removeEdge()

However, addEdge() and removeEdge() are especially decorated to request a graph update so, with the old markNodesDirty() implementation, the update was done twice in a row.
This commit is contained in:
Julien-Haudegond 2020-08-27 17:16:40 +02:00
parent 06b821349f
commit 74fa3022fe
2 changed files with 2 additions and 2 deletions

View file

@ -142,6 +142,7 @@ class Attribute(BaseObject):
def requestGraphUpdate(self):
if self.node.graph:
self.node.graph.markNodesDirty(self.node)
self.node.graph.update()
@property
def isOutput(self):