wxCLOSE->wxCLOSE_BOX
[wxWidgets.git] / src / mac / carbon / dialog.cpp
index 1ef72057f85f727c1a4ca29b896129a00155ca5d..b0daaad6850f69ae8d34b4e44b1db34cd61ed397 100644 (file)
@@ -209,9 +209,13 @@ void wxDialog::DoShowModal()
 // Replacement for Show(TRUE) for modal dialogs - returns return code
 int wxDialog::ShowModal()
 {
-  m_windowStyle |= wxDIALOG_MODAL;
-  Show(TRUE);
-  return GetReturnCode();
+       if ( !IsModal() )
+       {
+           SetModal(TRUE);
+       }
+
+       Show(TRUE);
+       return GetReturnCode();
 }
 
 // NB: this function (surprizingly) may be called for both modal and modeless