diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index 1ef72057f8..b0daaad685 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -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 diff --git a/src/mac/dialog.cpp b/src/mac/dialog.cpp index 1ef72057f8..b0daaad685 100644 --- a/src/mac/dialog.cpp +++ b/src/mac/dialog.cpp @@ -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