X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e1f8ea4a3c2764ec89d95f4edef40257e32ac5b..76b0f8384ed211c5f6b48597a62da743b604e666:/src/univ/dialog.cpp diff --git a/src/univ/dialog.cpp b/src/univ/dialog.cpp index c8b9e7aa7d..f12d20baa1 100644 --- a/src/univ/dialog.cpp +++ b/src/univ/dialog.cpp @@ -1,7 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/univ/dialog.cpp // Author: Robert Roebling, Vaclav Slavik -// Id: $Id$ // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -29,6 +28,7 @@ #endif #include "wx/evtloop.h" +#include "wx/modalhook.h" //----------------------------------------------------------------------------- // wxDialog @@ -128,7 +128,7 @@ void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) s_closing.Append(this); - wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); + wxCommandEvent cancelEvent(wxEVT_BUTTON, wxID_CANCEL); cancelEvent.SetEventObject(this); GetEventHandler()->ProcessEvent(cancelEvent); s_closing.DeleteObject(this); @@ -165,6 +165,8 @@ bool wxDialog::IsModal() const int wxDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + if ( IsModal() ) { wxFAIL_MSG( wxT("wxDialog:ShowModal called twice") );