X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a22318a0a95580692ffd79027450bb48da3a6acc..db679b8c836e69c111cdc31e62cf92cebe4f938f:/wxPython/demo/TreeCtrl.py?ds=sidebyside diff --git a/wxPython/demo/TreeCtrl.py b/wxPython/demo/TreeCtrl.py index 13137d648d..f36a659521 100644 --- a/wxPython/demo/TreeCtrl.py +++ b/wxPython/demo/TreeCtrl.py @@ -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()