Author Topic: Bug #11979  (Read 5104 times)

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Bug #11979
« on: September 19, 2007, 07:31:10 pm »
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:
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?
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: Bug #11979
« Reply #1 on: September 27, 2007, 09:12:38 pm »
As there seems to be no protest against this change I submitted the patch on berlios:
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2191&group_id=5358
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Bug #11979
« Reply #2 on: September 27, 2007, 09:58:56 pm »
Be patient!
This bug will be fixed soon...