Make sure that all loaded xrc dialogs have the correct parent. This might be overkill, but shouldn't hurt.

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1272 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
wowzaman12 2015-03-28 13:54:49 +00:00
parent 45f83cb2d5
commit d27a24a522
1 changed files with 7 additions and 0 deletions

View File

@ -1972,6 +1972,13 @@ wxDialog * MainFrame::LoadXRCDialog(const char * name)
wxString dname = wxString::FromUTF8(name);
wxDialog * dialog = wxXmlResource::Get()->LoadDialog(this, dname);
CheckThrowXRCError(dialog,name);
/* wx-2.9.1 doesn't set parent for propertysheetdialogs for some reason */
/* this will generate a gtk warning but it is necessary for later */
/* retrieval using FindWindow() */
if(!dialog->GetParent())
dialog->Reparent(this);
mark_recursive(dialog);
return dialog;
}