Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Patch for annoying layout-changed question
(1/1)
Jenna:
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.
--- End quote ---
Bug report
Patch
artoj:
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.
MortenMacFly:
--- Quote from: artoj 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.
--- End quote ---
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.
--- Quote from: artoj on January 13, 2008, 11:09:49 pm ---Also, this patch introduced three new memory leaks.
--- End quote ---
Fixed that one in SVN. Thanks! Hey Yiannis: You did apply the first revision, right...?! :lol:
Jenna:
--- Quote from: MortenMacFly on January 14, 2008, 08:48:10 am ---
--- Quote from: artoj on January 13, 2008, 11:09:49 pm ---Also, this patch introduced three new memory leaks.
--- End quote ---
Fixed that one in SVN. Thanks! Hey Yiannis: You did apply the first revision, right...?! :lol:
--- End quote ---
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.
Navigation
[0] Message Index
Go to full version