|
|
@@ -810,7 +810,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica |
|
|
|
result.setInfo ("Save Project",
|
|
|
|
"Saves the current project",
|
|
|
|
CommandCategories::general, 0);
|
|
|
|
result.setActive (project != nullptr);
|
|
|
|
result.setActive (project != nullptr && ! project->isCurrentlySaving());
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CommandIDs::closeProject:
|
|
|
@@ -824,7 +824,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica |
|
|
|
result.setInfo ("Save" + documentName,
|
|
|
|
"Saves the current document",
|
|
|
|
CommandCategories::general, 0);
|
|
|
|
result.setActive (currentDocument != nullptr || project != nullptr);
|
|
|
|
result.setActive (currentDocument != nullptr || (project != nullptr && ! project->isCurrentlySaving()));
|
|
|
|
result.defaultKeypresses.add (KeyPress ('s', ModifierKeys::commandModifier, 0));
|
|
|
|
break;
|
|
|
|
|
|
|
@@ -935,7 +935,7 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica |
|
|
|
result.setInfo ("Save Project and Open in IDE...",
|
|
|
|
"Saves the project and launches it in an external IDE",
|
|
|
|
CommandCategories::general, 0);
|
|
|
|
result.setActive (ProjectExporter::canProjectBeLaunched (project));
|
|
|
|
result.setActive (ProjectExporter::canProjectBeLaunched (project) && ! project->isCurrentlySaving());
|
|
|
|
result.defaultKeypresses.add (KeyPress ('l', ModifierKeys::commandModifier | ModifierKeys::shiftModifier, 0));
|
|
|
|
break;
|
|
|
|
|
|
|
@@ -1049,6 +1049,10 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica |
|
|
|
|
|
|
|
bool ProjectContentComponent::perform (const InvocationInfo& info)
|
|
|
|
{
|
|
|
|
// don't allow the project to be saved again if it's currently saving
|
|
|
|
if (isSaveCommand (info.commandID) && (project != nullptr && project->isCurrentlySaving()))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
switch (info.commandID)
|
|
|
|
{
|
|
|
|
case CommandIDs::saveProject:
|
|
|
@@ -1121,6 +1125,11 @@ bool ProjectContentComponent::perform (const InvocationInfo& info) |
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool ProjectContentComponent::isSaveCommand (const CommandID id)
|
|
|
|
{
|
|
|
|
return (id == CommandIDs::saveProject || id == CommandIDs::saveDocument || id == CommandIDs::saveAndOpenInIDE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ProjectContentComponent::getSelectedProjectItemsBeingDragged (const DragAndDropTarget::SourceDetails& dragSourceDetails,
|
|
|
|
OwnedArray<Project::Item>& selectedNodes)
|
|
|
|
{
|
|
|
|