X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/524c47aa3adf2af11a3069fd5da035a604f08f66..070d639118b3483c2328f9e5f56fa71e0ef80229:/src/osx/carbon/dirdlg.cpp diff --git a/src/osx/carbon/dirdlg.cpp b/src/osx/carbon/dirdlg.cpp index 157e07845d..4f98aa02da 100644 --- a/src/osx/carbon/dirdlg.cpp +++ b/src/osx/carbon/dirdlg.cpp @@ -18,10 +18,10 @@ #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/dialog.h" - #include "wx/cmndata.h" #endif // WX_PRECOMP #include "wx/filename.h" +#include "wx/testing.h" #include "wx/osx/private.h" @@ -73,6 +73,8 @@ wxDirDialog::wxDirDialog(wxWindow *parent, int wxDirDialog::ShowModal() { + WX_TESTING_SHOW_MODAL_HOOK(); + NavDialogRef dialog = NULL; NavDialogCreationOptions options; NavReplyRecord reply ; @@ -88,7 +90,9 @@ int wxDirDialog::ShowModal() err = NavCreateChooseFolderDialog(&options, sStandardNavEventFilter , NULL, this , &dialog); if (err == noErr) { + wxDialog::OSXBeginModalDialog(); err = NavDialogRun(dialog); + wxDialog::OSXEndModalDialog(); if ( err == noErr ) { err = NavDialogGetReply(dialog, &reply); @@ -132,8 +136,8 @@ int wxDirDialog::ShowModal() if ( err != noErr && err != userCanceledErr ) m_path = wxEmptyString ; - if ( dialog ) - ::NavDialogDispose(dialog); + if ( dialog ) + ::NavDialogDispose(dialog); return (err == noErr) ? wxID_OK : wxID_CANCEL ; }