]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/filedlg.cpp
new method for contentScaleFactor on main screen
[wxWidgets.git] / src / osx / carbon / filedlg.cpp
index c6503c8b9137eb0ca88b4150beafc0c3a5477940..b0a4e7b51b444608790d6c4c781fe442c02fa9e4 100644 (file)
@@ -26,6 +26,7 @@
 #include "wx/filename.h"
 
 #include "wx/osx/private.h"
+#include "wx/modalhook.h"
 
 #ifndef __DARWIN__
     #include <Navigation.h>
@@ -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();