1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Introjucer: optimised some unnecessary project copying.

This commit is contained in:
jules 2012-07-22 14:21:07 +01:00
parent dac898c601
commit e875ddc3a1
9 changed files with 82 additions and 38 deletions

View file

@ -402,17 +402,6 @@ void ProjectContentComponent::updateMainWindowTitle()
mw->updateTitle (currentDocument != nullptr ? currentDocument->getName() : String::empty);
}
bool ProjectContentComponent::canProjectBeLaunched() const
{
if (project != nullptr)
{
ScopedPointer <ProjectExporter> launcher (ProjectExporter::createPlatformDefaultExporter (*project));
return launcher != nullptr;
}
return false;
}
ApplicationCommandTarget* ProjectContentComponent::getNextCommandTarget()
{
return findFirstTargetParentComponent();
@ -507,7 +496,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica
#endif
"Launches the project in an external IDE",
CommandCategories::general, 0);
result.setActive (canProjectBeLaunched());
result.setActive (ProjectExporter::canProjectBeLaunched (project));
break;
case CommandIDs::saveAndOpenInIDE:
@ -520,7 +509,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica
#endif
"Saves the project and launches it in an external IDE",
CommandCategories::general, 0);
result.setActive (canProjectBeLaunched());
result.setActive (ProjectExporter::canProjectBeLaunched (project));
result.defaultKeypresses.add (KeyPress ('l', ModifierKeys::commandModifier, 0));
break;