From 7d4c006e68f4ce26120554d24e10bb7dc810df02 Mon Sep 17 00:00:00 2001 From: Yann Lanthony Date: Tue, 14 Nov 2017 16:35:24 +0100 Subject: [PATCH] [graph] List: multiple children attribute deletion + remove edges if any --- meshroom/core/graph.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meshroom/core/graph.py b/meshroom/core/graph.py index 3f147d91..78813765 100644 --- a/meshroom/core/graph.py +++ b/meshroom/core/graph.py @@ -298,8 +298,13 @@ class ListAttribute(Attribute): if self.node.graph: self.node.graph.update() - def remove(self, index): - self._value.removeAt(index) + def remove(self, index, count=1): + if self.node.graph: + for i in range(index, index + count): + attr = self[i] + if attr.isLink: + self.node.graph.removeEdge(attr) # delete edge if the attribute is linked + self._value.removeAt(index, count) if self.node.graph: self.node.graph.update()