1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-08 04:20:09 +00:00

Projucer: Made sure a sensible default exporter is chosen when none have been selected

This commit is contained in:
ed 2019-05-21 16:27:02 +01:00
parent 84d6d21f54
commit 76c741e09b

View file

@ -169,8 +169,22 @@ void HeaderComponent::updateExporters() noexcept
}
if (exporterBox.getSelectedItemIndex() == -1)
exporterBox.setSelectedItemIndex (preferredExporterIndex != -1 ? preferredExporterIndex
: 0);
{
if (preferredExporterIndex == -1)
{
i = 0;
for (Project::ExporterIterator exporter (*project); exporter.next(); ++i)
{
if (exporter->canLaunchProject())
{
preferredExporterIndex = i;
break;
}
}
}
exporterBox.setSelectedItemIndex (preferredExporterIndex != -1 ? preferredExporterIndex : 0);
}
updateExporterButton();
}