X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..fb8d7eb7a880f1f2e32d8830f9c5e12b2536e05f:/src/os2/dialog.cpp diff --git a/src/os2/dialog.cpp b/src/os2/dialog.cpp index a8f0d6f9d1..c6520d9698 100644 --- a/src/os2/dialog.cpp +++ b/src/os2/dialog.cpp @@ -26,6 +26,7 @@ #include "wx/os2/private.h" #include "wx/evtloop.h" #include "wx/scopedptr.h" +#include "wx/modalhook.h" #define wxDIALOG_DEFAULT_X 300 #define wxDIALOG_DEFAULT_Y 300 @@ -33,7 +34,6 @@ #define wxDIALOG_DEFAULT_WIDTH 500 #define wxDIALOG_DEFAULT_HEIGHT 500 -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow) // ---------------------------------------------------------------------------- // wxDialogModalData @@ -115,7 +115,7 @@ bool wxDialog::Create( wxWindow* pParent, // // Must defer setting the title until after dialog is created and sized // - if (!rsTitle.IsNull()) + if ( !rsTitle.empty() ) SetTitle(rsTitle); return true; } // end of wxDialog::Create @@ -180,11 +180,7 @@ bool wxDialog::Show( bool bShow ) // and we will lose activation m_modalData->ExitLoop(); #if 0 - if (m_pWindowDisabler) - { - delete m_pWindowDisabler; - m_pWindowDisabler = NULL; - } + wxDELETE(m_pWindowDisabler); #endif } @@ -224,6 +220,8 @@ bool wxDialog::Show( bool bShow ) // int wxDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + wxASSERT_MSG( !IsModal(), wxT("wxDialog::ShowModal() reentered?") ); m_endModalCalled = false;