Make sure that all loaded xrc dialogs have the correct parent

This might be overkill, but shouldn't hurt.
This commit is contained in:
Arthur Moore 2015-01-12 02:18:44 -05:00
parent 2959b0adfa
commit 125b26a484
1 changed files with 7 additions and 0 deletions

View File

@ -2082,6 +2082,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;
}
wxPropertySheetDialog * MainFrame::LoadXRCropertySheetDialog(const char * name)