IDE: fix exception when removing a file in Project Files manager.
--- a/controls/FolderTree.py Wed Oct 19 20:53:01 2022 +0200
+++ b/controls/FolderTree.py Wed Oct 19 22:04:39 2022 +0200
@@ -160,7 +160,7 @@
if wx.Platform != '__WXMSW__':
item, item_cookie = self.Tree.GetNextChild(root, item_cookie)
elif self.Tree.GetItemText(item) != filename:
- item = self.Tree.InsertItemBefore(root, idx, filename, self.TreeImageDict[item_type])
+ item = self.Tree.InsertItem(root, idx, filename, self.TreeImageDict[item_type])
filepath = os.path.join(folderpath, filename)
if item_type != FILE:
if self.Tree.IsExpanded(item):