X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c5f62640d5072b3ab9116a3852294ab58ebbfbb..a69b365fbbd7fe05b78187f4d8336dcaaf4c7485:/src/osx/dialog_osx.cpp diff --git a/src/osx/dialog_osx.cpp b/src/osx/dialog_osx.cpp index 835afaaa24..da2c32afec 100644 --- a/src/osx/dialog_osx.cpp +++ b/src/osx/dialog_osx.cpp @@ -115,7 +115,12 @@ bool wxDialog::Show(bool show) if ( !show ) { - switch( m_modality ) + const int modalityOrig = m_modality; + + // complete the 'hiding' before we send the event + m_modality = wxDIALOG_MODALITY_NONE; + + switch ( modalityOrig ) { case wxDIALOG_MODALITY_WINDOW_MODAL: EndWindowModal(); // OS X implementation method for cleanup @@ -124,7 +129,6 @@ bool wxDialog::Show(bool show) default: break; } - m_modality = wxDIALOG_MODALITY_NONE; } return true;