Make sure that all loaded xrc dialogs have the correct parent
This might be overkill, but shouldn't hurt.
This commit is contained in:
parent
2959b0adfa
commit
125b26a484
|
@ -2082,6 +2082,13 @@ wxDialog * MainFrame::LoadXRCDialog(const char * name)
|
||||||
wxString dname = wxString::FromUTF8(name);
|
wxString dname = wxString::FromUTF8(name);
|
||||||
wxDialog * dialog = wxXmlResource::Get()->LoadDialog(this, dname);
|
wxDialog * dialog = wxXmlResource::Get()->LoadDialog(this, dname);
|
||||||
CheckThrowXRCError(dialog,name);
|
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;
|
return dialog;
|
||||||
}
|
}
|
||||||
wxPropertySheetDialog * MainFrame::LoadXRCropertySheetDialog(const char * name)
|
wxPropertySheetDialog * MainFrame::LoadXRCropertySheetDialog(const char * name)
|
||||||
|
|
Loading…
Reference in New Issue