Author Topic: Patch for annoying layout-changed question  (Read 4354 times)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Patch for annoying layout-changed question
« on: January 01, 2008, 09:37:38 pm »
I just posted a bug-report and a patch for the following problem:
Quote
C::B often says the layout has changed, even if it is the same and asks therefor if it should be saved.
This happens, because the actual layout is fetched with wxAuiManager::SavePerspective(). The function returns a serialized array containing the layout info. Sometimes the order of the InfoPanes in the array has changed, but their content is the same. Until now C::B compares the serialized arrays (the actual one and a saved one). If the order inside the array has changed, the strings are different and C::B believes that the content has changed.
I wrote a function that splits the strings in arrays, sorts them and compares the arrays. If they differ true is returned.
Bug report
Patch

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: Patch for annoying layout-changed question
« Reply #1 on: January 13, 2008, 11:09:49 pm »
I'm still seeing this problem. If I launch C::B and close it (without opening any files or project) it still asks to save the layout.

Also, this patch introduced three new memory leaks.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Patch for annoying layout-changed question
« Reply #2 on: January 14, 2008, 08:48:10 am »
I'm still seeing this problem. If I launch C::B and close it (without opening any files or project) it still asks to save the layout.
Not really - the patch works indeed better. I onle mean "better" casue it's far from being perfect. The issue is, that if you just select another part of the IDE the layout data becomes different. Also if you e.g. maximize/restore the layout is different. And this is what usually happens all the time when you are asked.

Also, this patch introduced three new memory leaks.
Fixed that one in SVN. Thanks! Hey Yiannis: You did apply the first revision, right...?! :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Patch for annoying layout-changed question
« Reply #3 on: January 14, 2008, 10:43:39 am »
Also, this patch introduced three new memory leaks.
Fixed that one in SVN. Thanks! Hey Yiannis: You did apply the first revision, right...?! :lol:
Thanks for fixing this. It was my error.
I believed that wxWidgets is able to free memory allocated by member-functions on it's own, when leaving the function where it happens and the variables, or the pointers to the memoryrange become invalid.