File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -857,11 +857,14 @@ def resetAttribute(self, attribute):
857857 """ Reset 'attribute' to its default value """
858858 # if the attribute is a ListAttribute, remove all edges
859859 if isinstance (attribute , ListAttribute ):
860- for edge in self ._graph .edges :
861- # if the edge is connected to one of the ListAttribute's elements, remove it
862- if edge .src in attribute .value :
863- self .removeEdge (edge )
864- self .push (commands .SetAttributeCommand (self ._graph , attribute , attribute .defaultValue ()))
860+ with self .groupedGraphModification ("Reset List Attribute '{}'" .format (attribute .name )):
861+ for edge in self ._graph .edges :
862+ # if the edge is connected to one of the ListAttribute's elements, remove it
863+ if edge .src in attribute .value :
864+ self .removeEdge (edge )
865+ self .push (commands .SetAttributeCommand (self ._graph , attribute , attribute .defaultValue ()))
866+ else :
867+ self .push (commands .SetAttributeCommand (self ._graph , attribute , attribute .defaultValue ()))
865868
866869 @Slot (CompatibilityNode , result = Node )
867870 def upgradeNode (self , node ):
You can’t perform that action at this time.
0 commit comments