# HG changeset patch # User Edouard Tisserant # Date 1666209879 -7200 # Node ID 99b20dff00d5cf6d14d80d8f30015c66fce281cb # Parent 5107a2712b175bb1e19352cc8eff4b9291e2b03f IDE: fix exception when removing a file in Project Files manager. diff -r 5107a2712b17 -r 99b20dff00d5 controls/FolderTree.py --- 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):