Kirix Support Forums

Safely loading pane info

Please post any wxAUI patches or modifications you've created here. Thanks!

Safely loading pane info

Postby Les Newell on Tue Mar 04, 2008 8:24 am

Here is a patch for wxAuiManager::LoadPerspective that makes sure the caption and size hints are not loaded. This prevents layout problems if you change the contents of a pane from last time it was saved.

--- C:\Documents and Settings\Les Newell\Desktop\framemanager.cpp Tue Sep 25 08:48:06 2007
+++ C:\wxWidgets-2.8.6\src\aui\framemanager.cpp Tue Mar 04 13:27:26 2008
@@ -1447,9 +1447,12 @@
{
// the pane window couldn't be found
// in the existing layout
- return false;
+ continue;
}
-
+ pane.caption = p.caption;
+ pane.best_size = p.best_size;
+ pane.min_size = p.min_size;
+ pane.max_size = p.max_size;
p.SafeSet(pane);

}
Les Newell
Registered User
 
Posts: 4
Joined: Fri Feb 16, 2007 5:52 am

Return to wxAUI Patches & Modifications