X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b822bdc032e508858596a36cf5f344d60bf26f34..7e4952db837344e369ff9ccc7ece1f7b8c207cf1:/src/osx/cocoa/filedlg.mm?ds=sidebyside diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index dfb81bc98d..0b34682a72 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -176,9 +176,9 @@ int wxFileDialog::ShowModal() if ( HasFlag(wxFD_OVERWRITE_PROMPT) ) { } - - // avoid multiple event handlers on stack - if ( 0 /*parentWindow*/) + +/* + if (parentWindow) { NSWindow* nativeParent = parentWindow->GetWXWindow(); ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; @@ -191,6 +191,7 @@ int wxFileDialog::ShowModal() [sheetDelegate release]; } else +*/ { returnCode = [sPanel runModalForDirectory:dir.AsNSString() file:file.AsNSString() ]; } @@ -217,8 +218,8 @@ int wxFileDialog::ShowModal() [oPanel setCanChooseFiles:YES]; [oPanel setMessage:cf.AsNSString()]; - // avoid multiple event handlers on stack - if ( 0 /*parentWindow*/) +/* + if (parentWindow) { NSWindow* nativeParent = parentWindow->GetWXWindow(); ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; @@ -232,6 +233,7 @@ int wxFileDialog::ShowModal() [sheetDelegate release]; } else +*/ { returnCode = [oPanel runModalForDirectory:dir.AsNSString() file:file.AsNSString() types:types];