]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dialog.cpp
Patch [ 1314868 ] [wxMSW] Show MDI child menubars when ShowFullScreen(false)
[wxWidgets.git] / src / mac / carbon / dialog.cpp
index 830ab7f87538839f4f4a2035ad217d14710bd5ab..d1aa43669ca7044df6a348be1137d229a475afe8 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "dialog.h"
-#endif
-
 #include "wx/wxprec.h"
 
 #include "wx/dialog.h"
@@ -112,7 +108,8 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
 
 bool wxDialog::IsModal() const
 {
-    return m_isModalStyle;
+    return wxModalDialogs.Find((wxDialog *)this) != NULL; // const_cast
+    //    return m_isModalStyle;
 }
 
 
@@ -135,7 +132,7 @@ bool wxDialog::Show(bool show)
         InitDialog();
     }
 
-    if ( IsModal() )
+    if ( m_isModalStyle )
     {
         if ( show )
         {
@@ -189,7 +186,7 @@ void wxDialog::DoShowModal()
 // Replacement for Show(TRUE) for modal dialogs - returns return code
 int wxDialog::ShowModal()
 {
-    if ( !IsModal() )
+    if ( !m_isModalStyle )
     {
         SetModal(TRUE);
     }
@@ -202,8 +199,9 @@ int wxDialog::ShowModal()
 //     dialogs and should work for both of them
 void wxDialog::EndModal(int retCode)
 {
-  SetReturnCode(retCode);
-  Show(FALSE);
+    SetReturnCode(retCode);
+    Show(FALSE);
+    SetModal(false);
 }
 
 // Standard buttons