Ensure menu items are sorted on newer macOS versions
With the new file system introduced in macOS High Sierra, juce::DirectoryIterator will usually not return items in alphabetical order. The fact that it ever did was only luck. See https://forum.juce.com/t/directoryiterator-possibly-broken-in-high-sierra-solved-not-juce-bug/24627/2
This commit is contained in:
parent
19d4350ac8
commit
599ef00031
2 changed files with 2 additions and 2 deletions
|
@ -645,7 +645,7 @@ void ObxdAudioProcessorEditor::mouseUp(const MouseEvent& e)
|
||||||
DirectoryIterator it(getFilter()->getSkinFolder(), false, "*", File::findDirectories);
|
DirectoryIterator it(getFilter()->getSkinFolder(), false, "*", File::findDirectories);
|
||||||
while (it.next())
|
while (it.next())
|
||||||
{
|
{
|
||||||
skins.add(it.getFile());
|
skins.addUsingDefaultSort(it.getFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < skins.size(); ++i)
|
for (int i = 0; i < skins.size(); ++i)
|
||||||
|
|
|
@ -941,7 +941,7 @@ void ObxdAudioProcessor::scanAndUpdateBanks()
|
||||||
DirectoryIterator it(getBanksFolder(), false, "*.fxb", File::findFiles);
|
DirectoryIterator it(getBanksFolder(), false, "*.fxb", File::findFiles);
|
||||||
while (it.next())
|
while (it.next())
|
||||||
{
|
{
|
||||||
bankFiles.add(it.getFile());
|
bankFiles.addUsingDefaultSort(it.getFile());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue