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:
parent
84d6d21f54
commit
76c741e09b
1 changed files with 16 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue