]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/TreeCtrl.py
Another package name fix
[wxWidgets.git] / wxPython / demo / TreeCtrl.py
index 13137d648d4f94c106d328f4c8f476dc73a646d7..397deb0a0a736bc5aad54a16ff8c5efcfee231c1 100644 (file)
@@ -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()