]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xmlres.cpp
Fixed apparent typo in wxGridCellAttr::MergeWith, hopefully fixing
[wxWidgets.git] / src / xrc / xmlres.cpp
index 21375aff6034109fda333ad1cba2d13278f849af..0a1b72cd3a352efede382725cee04ab4ecc9074c 100644 (file)
@@ -171,10 +171,7 @@ wxToolBar *wxXmlResource::LoadToolBar(wxWindow *parent, const wxString& name)
 
 wxDialog *wxXmlResource::LoadDialog(wxWindow *parent, const wxString& name)
 {
-    wxDialog *dialog = new wxDialog;
-    if (!LoadDialog(dialog, parent, name))
-        { delete dialog; return NULL; }
-    else return dialog;
+    return (wxDialog*)CreateResFromNode(FindResource(name, wxT("wxDialog")), parent, NULL);
 }
 
 bool wxXmlResource::LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name)