From: Julian Smart Date: Tue, 20 Sep 2005 11:03:49 +0000 (+0000) Subject: IsModal now has the newer meaning. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/285ce5a34173b5d6b6ae60f80c11981f262ebf51 IsModal now has the newer meaning. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index 830ab7f875..63f74ce6c6 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -112,7 +112,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 +136,7 @@ bool wxDialog::Show(bool show) InitDialog(); } - if ( IsModal() ) + if ( m_isModalStyle ) { if ( show ) { @@ -189,7 +190,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 +203,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