X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce00f59b5b169752d2f05ce3bb1a88ddc1b38b4c..e788ceb8fa139a8e06378b4d380128c42da8bd86:/src/osx/carbon/filedlg.cpp diff --git a/src/osx/carbon/filedlg.cpp b/src/osx/carbon/filedlg.cpp index c6503c8b91..b0a4e7b51b 100644 --- a/src/osx/carbon/filedlg.cpp +++ b/src/osx/carbon/filedlg.cpp @@ -26,6 +26,7 @@ #include "wx/filename.h" #include "wx/osx/private.h" +#include "wx/modalhook.h" #ifndef __DARWIN__ #include @@ -324,11 +325,11 @@ void OpenUserDataRec::MakeUserDataRec( const wxString& filter ) wxString extension = m_extensions[i]; // Remove leading '*' - if (extension.length() && (extension.GetChar(0) == '*')) + if ( !extension.empty() && (extension.GetChar(0) == '*') ) extension = extension.Mid( 1 ); // Remove leading '.' - if (extension.length() && (extension.GetChar(0) == '.')) + if ( !extension.empty() && (extension.GetChar(0) == '.') ) extension = extension.Mid( 1 ); if (wxFileName::MacFindDefaultTypeAndCreator( extension, &fileType, &creator )) @@ -476,6 +477,8 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) int wxFileDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + m_paths.Empty(); m_fileNames.Empty();