Bläddra i källkod

wxGUI/treemodel: fix removing children of root (#775)

Anna Petrasova 4 år sedan
förälder
incheckning
f0dea931f7
1 ändrade filer med 1 tillägg och 2 borttagningar
  1. 1 2
      gui/wxpython/core/treemodel.py

+ 1 - 2
gui/wxpython/core/treemodel.py

@@ -134,8 +134,7 @@ class TreeModel(object):
             node.parent.children.remove(node)
         else:
             # node is root
-            for n in node.children:
-                node.children.remove(n)
+            del node.children[:]
 
     def SortChildren(self, node):
         """Sorts children alphabetically based on label."""