Allow files to be selected on mac when opening

pull/170/head
James Ball 2023-09-09 10:02:16 +01:00
rodzic fca62d009f
commit 2157b8a867
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -11,7 +11,8 @@ MainComponent::MainComponent(OscirenderAudioProcessor& p, OscirenderAudioProcess
fileButton.onClick = [this] {
chooser = std::make_unique<juce::FileChooser>("Open", juce::File::getSpecialLocation(juce::File::userHomeDirectory), "*.obj;*.svg;*.lua;*.txt");
auto flags = juce::FileBrowserComponent::openMode | juce::FileBrowserComponent::canSelectMultipleItems;
auto flags = juce::FileBrowserComponent::openMode | juce::FileBrowserComponent::canSelectMultipleItems |
juce::FileBrowserComponent::canSelectFiles;
chooser->launchAsync(flags, [this](const juce::FileChooser& chooser) {
juce::SpinLock::ScopedLockType lock(audioProcessor.parsersLock);

Wyświetl plik

@ -300,7 +300,8 @@ void OscirenderAudioProcessorEditor::newProject() {
void OscirenderAudioProcessorEditor::openProject() {
chooser = std::make_unique<juce::FileChooser>("Load osci-render Project", juce::File::getSpecialLocation(juce::File::userHomeDirectory), "*.osci");
auto flags = juce::FileBrowserComponent::openMode;
auto flags = juce::FileBrowserComponent::openMode |
juce::FileBrowserComponent::canSelectFiles;
chooser->launchAsync(flags, [this](const juce::FileChooser& chooser) {
auto file = chooser.getResult();