X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3aa8e4ea6db0478d3bc862f59f100408bdc8732f..bba35861478a26f5d8c756a9a7fa2bbd19a69cb1:/src/motif/dialog.cpp diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index 59b8baf077..3955a68d45 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -12,13 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#define XtWindow XTWINDOW -#define XtParent XTPARENT -#define XtScreen XTSCREEN -#endif - #include "wx/dialog.h" #ifndef WX_PRECOMP @@ -190,6 +183,9 @@ wxDialog::~wxDialog() { m_isBeingDeleted = true; + // if the dialog is modal, this will end its event loop + Show(false); + delete m_eventLoop; if (m_mainWidget) @@ -248,6 +244,9 @@ bool wxDialog::Show( bool show ) if( !wxWindowBase::Show( show ) ) return false; + if ( !show && IsModal() ) + EndModal(wxID_CANCEL); + m_isShown = show; if (show)