X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3857173d3c186214cbc73ce764d122d5cf7b98d6..02b94f4e73cd7423b27aafb388179a8c7e856df1:/src/os2/dialog.cpp diff --git a/src/os2/dialog.cpp b/src/os2/dialog.cpp index 12d98447d1..d7da58b468 100644 --- a/src/os2/dialog.cpp +++ b/src/os2/dialog.cpp @@ -25,7 +25,7 @@ #include "wx/os2/private.h" #include "wx/evtloop.h" -#include "wx/ptr_scpd.h" +#include "wx/scopedptr.h" #define wxDIALOG_DEFAULT_X 300 #define wxDIALOG_DEFAULT_Y 300 @@ -72,9 +72,9 @@ wxDEFINE_TIED_SCOPED_PTR_TYPE(wxDialogModalData); void wxDialog::Init() { - m_pOldFocus = (wxWindow *)NULL; + m_pOldFocus = NULL; m_isShown = false; - m_pWindowDisabler = (wxWindowDisabler *)NULL; + m_pWindowDisabler = NULL; m_modalData = NULL; SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); } // end of wxDialog::Init @@ -147,7 +147,7 @@ void wxDialog::SetModal(bool WXUNUSED(bFlag)) wxDialog::~wxDialog() { - m_isBeingDeleted = true; + SendDestroyEvent(); // this will also reenable all the other windows for a modal dialog Show(false); @@ -212,6 +212,9 @@ bool wxDialog::Show( bool bShow ) if (bShow) { + if (CanDoLayoutAdaptation()) + DoLayoutAdaptation(); + // this usually will result in TransferDataToWindow() being called // which will change the controls values so do it before showing as // otherwise we could have some flicker @@ -222,7 +225,7 @@ bool wxDialog::Show( bool bShow ) wxString title = GetTitle(); if (!title.empty()) - ::WinSetWindowText((HWND)GetHwnd(), (PSZ)title.c_str()); + ::WinSetWindowText((HWND)GetHwnd(), title.c_str()); if ( bShow ) {