Browse Source

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

Anna Petrasova 4 years ago
parent
commit
f0dea931f7
1 changed files with 1 additions and 2 deletions
  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."""