diff --git a/interface/wx/filedlg.h b/interface/wx/filedlg.h index 022686a6b8..9a0e60efd8 100644 --- a/interface/wx/filedlg.h +++ b/interface/wx/filedlg.h @@ -124,7 +124,8 @@ const char wxFileSelectorDefaultWildcardStr[]; @style{wxFD_NO_FOLLOW} Directs the dialog to return the path and file name of the selected shortcut file, not its target as it does by default. Currently this - flag is only implemented in wxMSW and the non-dereferenced link path + flag is only implemented in wxMSW and wxOSX (where it prevents + aliases from being resolved). The non-dereferenced link path is always returned, even without this flag, under Unix and so using it there doesn't do anything. This flag was added in wxWidgets 3.1.0. diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index 6a43696b12..e31aa828a7 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -350,7 +350,7 @@ void wxFileDialog::ShowWindowModal() [oPanel setTreatsFilePackagesAsDirectories:NO]; [oPanel setCanChooseDirectories:NO]; - [oPanel setResolvesAliases:YES]; + [oPanel setResolvesAliases:HasFlag(wxFD_NO_FOLLOW) ? NO : YES]; [oPanel setCanChooseFiles:YES]; [oPanel setMessage:cf.AsNSString()]; [oPanel setAllowsMultipleSelection: (HasFlag(wxFD_MULTIPLE) ? YES : NO )]; @@ -608,7 +608,7 @@ int wxFileDialog::ShowModal() [oPanel setTreatsFilePackagesAsDirectories:NO]; [oPanel setCanChooseDirectories:NO]; - [oPanel setResolvesAliases:YES]; + [oPanel setResolvesAliases:HasFlag(wxFD_NO_FOLLOW) ? NO : YES]; [oPanel setCanChooseFiles:YES]; [oPanel setMessage:cf.AsNSString()]; [oPanel setAllowsMultipleSelection: (HasFlag(wxFD_MULTIPLE) ? YES : NO )];