]> git.saurik.com Git - wxWidgets.git/commitdiff
avoid idling in native file dialogs
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 15 Jun 2012 16:57:27 +0000 (16:57 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 15 Jun 2012 16:57:27 +0000 (16:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/dirdlg.mm
src/osx/cocoa/filedlg.mm

index 065b554241362aeaaeafa542b845260c93ef8b37..7d7dc66a2193e93de42814c758c0419d49d2823a 100644 (file)
@@ -31,6 +31,7 @@
 #endif
 
 #include "wx/filename.h"
 #endif
 
 #include "wx/filename.h"
+#include "wx/evtloop.h"
 
 #include "wx/osx/private.h"
 
 
 #include "wx/osx/private.h"
 
@@ -90,6 +91,8 @@ void wxDirDialog::ShowWindowModal()
 
 int wxDirDialog::ShowModal()
 {
 
 int wxDirDialog::ShowModal()
 {
+    wxCFEventLoopPauseIdleEvents pause;
+
     NSOpenPanel *oPanel = [NSOpenPanel openPanel];
     [oPanel setCanChooseDirectories:YES];
     [oPanel setResolvesAliases:YES];
     NSOpenPanel *oPanel = [NSOpenPanel openPanel];
     [oPanel setCanChooseDirectories:YES];
     [oPanel setResolvesAliases:YES];
index d08d3a3c3ed8add3c71567eae42b8cd5c29fdb04..6c3386e53fefa73a84b779e5316bf4070561c5cf 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "wx/filename.h"
 #include "wx/tokenzr.h"
 
 #include "wx/filename.h"
 #include "wx/tokenzr.h"
+#include "wx/evtloop.h"
 
 #include "wx/osx/private.h"
 #include "wx/sysopt.h"
 
 #include "wx/osx/private.h"
 #include "wx/sysopt.h"
@@ -494,6 +495,8 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow)
 
 int wxFileDialog::ShowModal()
 {
 
 int wxFileDialog::ShowModal()
 {
+    wxCFEventLoopPauseIdleEvents pause;
+
     wxMacAutoreleasePool autoreleasepool;
     
     wxCFStringRef cf( m_message );
     wxMacAutoreleasePool autoreleasepool;
     
     wxCFStringRef cf( m_message );