Broke up the creation of a wxDialog into two steps for easier debugging.

This commit is contained in:
Arthur Moore 2015-01-10 18:57:26 -05:00
parent 3d81d52a60
commit d3c5df6750
1 changed files with 2 additions and 1 deletions

View File

@ -2071,7 +2071,8 @@ wxDialog * MainFrame::LoadXRCDialog(const char * name)
wxString dname = wxString::FromUTF8(name);
/* using this instead of LoadDialog() allows non-wxDialog classes that */
/* are derived from wxDialog (like wxPropertySheetDialog) to work */
wxDialog * dialog = wxDynamicCast(wxXmlResource::Get()->LoadObject(this, dname, wxEmptyString), wxDialog);
wxObject * anObject = wxXmlResource::Get()->LoadObject(this, dname, wxEmptyString);
wxDialog * dialog = wxDynamicCast(anObject, wxDialog);
CheckThrowXRCError(dialog,name);
/* wx-2.9.1 doesn't set parent for propertysheetdialogs for some reason */