mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-19 03:56:26 +02:00
[ui] Node: fix slowness due to QML function calls with a lot of nodes
Instead of calling the duplicateList function for each node, at each modification, it is called only when we press the button.
This commit is contained in:
parent
02b9e34ba4
commit
d838e7866a
2 changed files with 8 additions and 5 deletions
|
@ -868,12 +868,12 @@ class BaseNode(BaseObject):
|
|||
|
||||
def updateDuplicates(self, nodesPerUid):
|
||||
""" Update the list of duplicate nodes (sharing the same uid). """
|
||||
if not nodesPerUid:
|
||||
uid = self._uids.get(0)
|
||||
if not nodesPerUid or not uid:
|
||||
self._duplicates.clear()
|
||||
self.duplicatesChanged.emit()
|
||||
return
|
||||
|
||||
uid = self._uids.get(0)
|
||||
self._duplicates.setObjectList([node for node in nodesPerUid.get(uid) if node != self])
|
||||
self.duplicatesChanged.emit()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue