X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f88f9fbf07addb70b5987e3c6f174d57673341e..17d98558b35b75e3cad68d96841b4fa5a0c7e6ee:/src/common/dlgcmn.cpp diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index 345d01a2d8..1a6b15c16b 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -116,12 +116,13 @@ wxWindow *wxDialogBase::CheckIfCanBeUsedAsParent(wxWindow *parent) const return parent; } -wxWindow *wxDialogBase::GetParentForModalDialog(wxWindow *parent) const +wxWindow * +wxDialogBase::GetParentForModalDialog(wxWindow *parent, long style) const { // creating a parent-less modal dialog will result (under e.g. wxGTK2) // in an unfocused dialog, so try to find a valid parent for it unless we // were explicitly asked not to - if ( HasFlag(wxDIALOG_NO_PARENT) ) + if ( style & wxDIALOG_NO_PARENT ) return NULL; // first try the given parent @@ -679,8 +680,7 @@ bool wxStandardDialogLayoutAdapter::DoLayoutAdaptation(wxDialog* dialog) stdButtonSizer->Realize(); else { - delete buttonSizer; - buttonSizer = NULL; + wxDELETE(buttonSizer); } }