X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/15f37147958a61adb54e0d64c82dc7b93c1f1cbe..88932ec82d048d006cdc81bd309f5e59aee799ac:/src/cocoa/dialog.mm diff --git a/src/cocoa/dialog.mm b/src/cocoa/dialog.mm index 1f412b0a33..fbc8bbe18d 100644 --- a/src/cocoa/dialog.mm +++ b/src/cocoa/dialog.mm @@ -6,7 +6,7 @@ // Created: 2002/12/15 // RCS-ID: $Id$ // Copyright: 2002 David Elliott -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" @@ -19,6 +19,7 @@ #include "wx/settings.h" #endif //WX_PRECOMP +#include "wx/testing.h" #include "wx/cocoa/autorelease.h" #include "wx/cocoa/string.h" @@ -99,6 +100,10 @@ bool wxDialog::Show(bool show) if(show) { wxAutoNSAutoreleasePool pool; + + if (CanDoLayoutAdaptation()) + DoLayoutAdaptation(); + InitDialog(); if(IsModal()) { // ShowModal() will show the dialog @@ -123,6 +128,8 @@ bool wxDialog::Show(bool show) // is stopped (via EndModal()) it returns the exit code. int wxDialog::ShowModal() { + WX_TESTING_SHOW_MODAL_HOOK(); + wxCHECK_MSG(!IsModal(),GetReturnCode(),wxT("wxDialog::ShowModal called within its own modal loop")); // Show(true) will set m_isShown = true