X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c5f62640d5072b3ab9116a3852294ab58ebbfbb..bc9d3d911cfb51f612a699d7fb00f57eb5b2097c:/src/osx/dialog_osx.cpp?ds=sidebyside 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;