X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9efc294a979fb4ae801f7dc37af35677301212d..2f30930a092c85f3255f8a0d79873cde438b0445:/src/univ/dialog.cpp?ds=sidebyside diff --git a/src/univ/dialog.cpp b/src/univ/dialog.cpp index c98a5e91ac..c0f69439b7 100644 --- a/src/univ/dialog.cpp +++ b/src/univ/dialog.cpp @@ -53,8 +53,6 @@ void wxDialog::Init() wxDialog::~wxDialog() { - m_isBeingDeleted = true; - // if the dialog is modal, this will end its event loop Show(false); @@ -181,20 +179,17 @@ int wxDialog::ShowModal() // use the apps top level window as parent if none given unless explicitly // forbidden - if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) ) + wxWindow * const parent = GetParentForModalDialog(); + if ( parent && parent != this ) { - wxWindow * const parent = GetParentForModalDialog(); - if ( parent && parent != this ) - { - m_parent = parent; - } + m_parent = parent; } Show(true); m_isShowingModal = true; - wxASSERT_MSG( !m_windowDisabler, _T("disabling windows twice?") ); + wxASSERT_MSG( !m_windowDisabler, wxT("disabling windows twice?") ); #if defined(__WXGTK__) || defined(__WXMGL__) wxBusyCursorSuspender suspender; @@ -212,7 +207,7 @@ int wxDialog::ShowModal() void wxDialog::EndModal(int retCode) { - wxASSERT_MSG( m_eventLoop, _T("wxDialog is not modal") ); + wxASSERT_MSG( m_eventLoop, wxT("wxDialog is not modal") ); SetReturnCode(retCode);