Selaa lähdekoodia

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

Anna Petrasova 4 vuotta sitten
vanhempi
commit
f0dea931f7
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  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."""