mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-24 06:26:29 +02:00
[graph] ListAttribute: replace '__getitem__ by 'at'
__getitem__ is spuriously called when the object is used inside a Qt model and exposed to QML, leading to unexpected behaviors
This commit is contained in:
parent
a5cda66670
commit
2cd724f957
4 changed files with 25 additions and 22 deletions
|
@ -259,7 +259,7 @@ class UIGraph(QObject):
|
|||
if isinstance(dst, graph.ListAttribute):
|
||||
with self.groupedGraphModification("Insert and Add Edge on {}".format(dst.fullName())):
|
||||
self.appendAttribute(dst)
|
||||
self.push(commands.AddEdgeCommand(self._graph, src, dst[-1]))
|
||||
self.push(commands.AddEdgeCommand(self._graph, src, dst.at(-1)))
|
||||
else:
|
||||
self.push(commands.AddEdgeCommand(self._graph, src, dst))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue