]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/TreeCtrl.py
reSWIGged
[wxWidgets.git] / wxPython / demo / TreeCtrl.py
index 13137d648d4f94c106d328f4c8f476dc73a646d7..f36a659521a7faf104a3aece41f2fec2ea39c394 100644 (file)
@@ -146,7 +146,8 @@ class TestTreeCtrlPanel(wx.Panel):
         if item:
             self.log.WriteText("OnLeftDClick: %s\n" % self.tree.GetItemText(item))
             parent = self.tree.GetItemParent(item)
-            self.tree.SortChildren(parent)
+            if parent.IsOk():
+                self.tree.SortChildren(parent)
         event.Skip()