X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3aa8e4ea6db0478d3bc862f59f100408bdc8732f..2ff16902a4fd9f3b70acc09e94d89927c41c7293:/src/mac/carbon/dialog.cpp diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index 858736fd33..8743e10547 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -62,21 +62,19 @@ void wxDialog::SetModal( bool flag ) { m_isModalStyle = true; - wxModelessWindows.DeleteObject( this ); - SetWindowModality( (WindowRef)MacGetWindowRef(), kWindowModalityAppModal, NULL ) ; } else { m_isModalStyle = false; - - wxModelessWindows.Append( this ); } } wxDialog::~wxDialog() { m_isBeingDeleted = true; + + // if the dialog is modal, this will end its event loop Show(false); }