mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Introjucer: fixed a problem with the open-project menu if multiple export targets have the same name
This commit is contained in:
parent
e527acd721
commit
53226c0660
2 changed files with 13 additions and 9 deletions
|
|
@ -571,25 +571,29 @@ StringArray ProjectContentComponent::getExportersWhichCanLaunch() const
|
|||
{
|
||||
StringArray s;
|
||||
|
||||
for (Project::ExporterIterator exporter (*project); exporter.next();)
|
||||
if (exporter->canLaunchProject())
|
||||
s.add (exporter->getName());
|
||||
if (project != nullptr)
|
||||
for (Project::ExporterIterator exporter (*project); exporter.next();)
|
||||
if (exporter->canLaunchProject())
|
||||
s.add (exporter->getName());
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
void ProjectContentComponent::openInIDE (const String& exporterName)
|
||||
void ProjectContentComponent::openInIDE (int exporterIndex)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (project != nullptr)
|
||||
for (Project::ExporterIterator exporter (*project); exporter.next();)
|
||||
if (exporter->getName() == exporterName && exporter->launchProject())
|
||||
break;
|
||||
if (exporter->canLaunchProject())
|
||||
if (i++ == exporterIndex && exporter->launchProject())
|
||||
break;
|
||||
}
|
||||
|
||||
static void openIDEMenuCallback (int result, ProjectContentComponent* comp)
|
||||
{
|
||||
if (comp != nullptr && result > 0)
|
||||
comp->openInIDE (comp->getExportersWhichCanLaunch() [result - 1]);
|
||||
comp->openInIDE (result - 1);
|
||||
}
|
||||
|
||||
void ProjectContentComponent::openInIDE()
|
||||
|
|
@ -610,7 +614,7 @@ void ProjectContentComponent::openInIDE()
|
|||
}
|
||||
else
|
||||
{
|
||||
openInIDE (possibleExporters[0]);
|
||||
openInIDE (0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public:
|
|||
bool saveProject();
|
||||
void closeProject();
|
||||
void openInIDE();
|
||||
void openInIDE (const String& exporterName);
|
||||
void openInIDE (int exporterIndex);
|
||||
|
||||
void showFilesTab();
|
||||
void showConfigTab();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue