avoid idling in native file dialogs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2012-06-15 16:57:27 +00:00
parent c657294b52
commit 1bfba4a096
2 changed files with 6 additions and 0 deletions

View File

@@ -31,6 +31,7 @@
#endif #endif
#include "wx/filename.h" #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]; NSOpenPanel *oPanel = [NSOpenPanel openPanel];
[oPanel setCanChooseDirectories:YES]; [oPanel setCanChooseDirectories:YES];
[oPanel setResolvesAliases:YES]; [oPanel setResolvesAliases:YES];

View File

@@ -34,6 +34,7 @@
#include "wx/filename.h" #include "wx/filename.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
#include "wx/evtloop.h"
#include "wx/osx/private.h" #include "wx/osx/private.h"
#include "wx/sysopt.h" #include "wx/sysopt.h"
@@ -494,6 +495,8 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow)
int wxFileDialog::ShowModal() int wxFileDialog::ShowModal()
{ {
wxCFEventLoopPauseIdleEvents pause;
wxMacAutoreleasePool autoreleasepool; wxMacAutoreleasePool autoreleasepool;
wxCFStringRef cf( m_message ); wxCFStringRef cf( m_message );