I'm just trying to fix
this one. I already discovered the reason for this bug and the fix is rather trivial: EditorManager::RebuildOpenedFilesTree rebuilds the tree but does not sort it. The fix for it is only adding a call to wxTreeCtrl::SortChildren in this function. Already did this and tested it and it seems to work. I will submit a patch for this later.
However, while searching for the problem I noticed another small issue:
In ProjectManager::EndLoadingProject, which is obviously called after a project was loaded, there are these lines of code:
#ifdef USE_OPENFILES_TREE
Manager::Get()->GetEditorManager()->RebuildOpenedFilesTree();
#endif
This causes a full rebuild of the tree (and therefore it was unsorted after loading a project). But is this really necessary? The tree is already created while all previously open files are opened and it is even sorted. I just removed this line and did a small test - no issue was visible to me. Am I missing something or is this rebuilding really not needed? If it is not needed any more may I add this change to my patch?