]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/dialog_osx.cpp
Set string in wxEVT_COMMAND_COMBOBOX_SELECTED event in wxOSX/Cocoa.
[wxWidgets.git] / src / osx / dialog_osx.cpp
index 835afaaa240b78332980de261ad2b97915a12ab1..da2c32afece2da807ca4292e67b7f5183e82a845 100644 (file)
@@ -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;