Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Contributions to C::B => Topic started by: Hazanko on February 28, 2026, 02:49:01 am

Title: Fixed project tree broken sort
Post by: Hazanko on February 28, 2026, 02:49:01 am
Project tree does not properly sort alpha when number of parents reaches a certain count(?). I'm assuming this has something to do with wx reallocating for more space and breaking the tree structure.
This is not an issue on my other machine with codeblocks 20.03/wxgtk3.05 handles sorting properly, as well as on windows(20.03,nightly,25.03).

Included checks for directories vs dirs & directories vs files in cbTreeCtrl::OnCompareItems(...).
Removed call to ProjectFindNodeToInsertAfter(...) in ProjectAddTreeNode(...) as sorting will be entirely handled by sorting children, as well as adding item as first child as we don't care about order at this point.
Title: Re: Fixed project tree broken sort
Post by: ollydbg on February 28, 2026, 03:26:31 am
Thanks, I'm not familiar with this part of the code. Other devs may have a try.  :)