X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a22318a0a95580692ffd79027450bb48da3a6acc..25b3661bd4cb44304418b93c0dee1d0dfb99765c:/wxPython/demo/TreeCtrl.py diff --git a/wxPython/demo/TreeCtrl.py b/wxPython/demo/TreeCtrl.py index 13137d648d..397deb0a0a 100644 --- a/wxPython/demo/TreeCtrl.py +++ b/wxPython/demo/TreeCtrl.py @@ -40,7 +40,7 @@ class TestTreeCtrlPanel(wx.Panel): il = wx.ImageList(isz[0], isz[1]) fldridx = il.Add(wx.ArtProvider_GetBitmap(wx.ART_FOLDER, wx.ART_OTHER, isz)) fldropenidx = il.Add(wx.ArtProvider_GetBitmap(wx.ART_FILE_OPEN, wx.ART_OTHER, isz)) - fileidx = il.Add(wx.ArtProvider_GetBitmap(wx.ART_REPORT_VIEW, wx.ART_OTHER, isz)) + fileidx = il.Add(wx.ArtProvider_GetBitmap(wx.ART_NORMAL_FILE, wx.ART_OTHER, isz)) smileidx = il.Add(images.getSmilesBitmap()) self.tree.SetImageList(il) @@ -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()