part of wxWizard loading from WXR patch I forgot to commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3145,27 +3145,31 @@ bool wxWindowBase::LoadFromResource(wxWindow *parent, const wxString& resourceNa
|
|||||||
int height = resource->GetHeight();
|
int height = resource->GetHeight();
|
||||||
wxString name = resource->GetName();
|
wxString name = resource->GetName();
|
||||||
|
|
||||||
if (IsKindOf(CLASSINFO(wxDialog)))
|
// this is used for loading wxWizard pages from WXR
|
||||||
|
if ( parent != this )
|
||||||
{
|
{
|
||||||
wxDialog *dialogBox = (wxDialog *)this;
|
if (IsKindOf(CLASSINFO(wxDialog)))
|
||||||
long modalStyle = isModal ? wxDIALOG_MODAL : 0;
|
{
|
||||||
if (!dialogBox->Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name))
|
wxDialog *dialogBox = (wxDialog *)this;
|
||||||
return FALSE;
|
long modalStyle = isModal ? wxDIALOG_MODAL : 0;
|
||||||
|
if (!dialogBox->Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
// Only reset the client size if we know we're not going to do it again below.
|
// Only reset the client size if we know we're not going to do it again below.
|
||||||
if ((resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) == 0)
|
if ((resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) == 0)
|
||||||
dialogBox->SetClientSize(width, height);
|
dialogBox->SetClientSize(width, height);
|
||||||
}
|
}
|
||||||
else if (IsKindOf(CLASSINFO(wxPanel)))
|
else if (IsKindOf(CLASSINFO(wxPanel)))
|
||||||
{
|
{
|
||||||
wxPanel* panel = (wxPanel *)this;
|
wxPanel* panel = (wxPanel *)this;
|
||||||
if (!panel->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle | wxTAB_TRAVERSAL, name))
|
if (!panel->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle | wxTAB_TRAVERSAL, name))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!((wxWindow *)this)->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle, name))
|
if (!((wxWindow *)this)->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle, name))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((resource->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0)
|
if ((resource->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0)
|
||||||
|
Reference in New Issue
Block a user