Browse Source

tags/2021-05-28
jules 17 years ago
parent
commit
782b955387
1 changed files with 14 additions and 2 deletions
  1. +14
    -2
      build/macosx/platform_specific_code/juce_mac_FileChooser.mm

+ 14
- 2
build/macosx/platform_specific_code/juce_mac_FileChooser.mm View File

@@ -117,8 +117,20 @@ void FileChooser::showPlatformDialog (OwnedArray<File>& results,

[panel setDelegate: delegate];

if ([panel runModalForDirectory: juceStringToNS (currentFileOrDirectory.getParentDirectory().getFullPathName())
file: juceStringToNS (currentFileOrDirectory.getFileName())]
String directory, filename;
if (currentFileOrDirectory.isDirectory())
{
directory = currentFileOrDirectory.getFullPathName();
}
else
{
directory = currentFileOrDirectory.getParentDirectory().getFullPathName();
filename = currentFileOrDirectory.getFileName();
}

if ([panel runModalForDirectory: juceStringToNS (directory)
file: juceStringToNS (filename)]
== NSOKButton)
{
if (isSaveDialogue)


Loading…
Cancel
Save