Skip to content

Commit

Permalink
[ui] Graph: canExpandForLoop: Ensure all checks are performed on a …
Browse files Browse the repository at this point in the history
…`ListAttribute`
  • Loading branch information
cbentejac committed Sep 26, 2024
1 parent 7592b3a commit b10027b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meshroom/ui/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,8 @@ def duplicateNodesFrom(self, nodes):
def canExpandForLoop(self, currentEdge):
""" Check if the list attribute can be expanded by looking at all the edges connected to it. """
listAttribute = currentEdge.src.root
if not listAttribute:
# Check that the parent is indeed a ListAttribute (it could be a GroupAttribute, for instance)
if not listAttribute or not isinstance(listAttribute, ListAttribute):
return False
srcIndex = listAttribute.index(currentEdge.src)
allSrc = [e.src for e in self._graph.edges.values()]
Expand Down

0 comments on commit b10027b

Please sign in to comment.