mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Ensure that save error messages are shown when using the "Save Project and Open in IDE" command
This commit is contained in:
parent
d53388097b
commit
77b816b042
4 changed files with 42 additions and 72 deletions
|
|
@ -226,31 +226,29 @@ void HeaderComponent::initialiseButtons()
|
|||
saveAndOpenInIDEButton.setIconInset (7);
|
||||
saveAndOpenInIDEButton.onClick = [this]
|
||||
{
|
||||
if (project != nullptr)
|
||||
if (project == nullptr)
|
||||
return;
|
||||
|
||||
if (! project->isSaveAndExportDisabled())
|
||||
{
|
||||
if (project->isSaveAndExportDisabled())
|
||||
{
|
||||
auto setWarningVisible = [this] (const Identifier& identifier)
|
||||
{
|
||||
auto child = project->getProjectMessages().getChildWithName (ProjectMessages::Ids::warning)
|
||||
.getChildWithName (identifier);
|
||||
|
||||
if (child.isValid())
|
||||
child.setProperty (ProjectMessages::Ids::isVisible, true, nullptr);
|
||||
};
|
||||
|
||||
if (project->hasIncompatibleLicenseTypeAndSplashScreenSetting())
|
||||
setWarningVisible (ProjectMessages::Ids::incompatibleLicense);
|
||||
|
||||
if (project->isFileModificationCheckPending())
|
||||
setWarningVisible (ProjectMessages::Ids::jucerFileModified);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (auto exporter = getSelectedExporter())
|
||||
project->openProjectInIDE (*exporter, true, nullptr);
|
||||
}
|
||||
projectContentComponent->openInSelectedIDE (true);
|
||||
return;
|
||||
}
|
||||
|
||||
auto setWarningVisible = [this] (const Identifier& identifier)
|
||||
{
|
||||
auto child = project->getProjectMessages().getChildWithName (ProjectMessages::Ids::warning)
|
||||
.getChildWithName (identifier);
|
||||
|
||||
if (child.isValid())
|
||||
child.setProperty (ProjectMessages::Ids::isVisible, true, nullptr);
|
||||
};
|
||||
|
||||
if (project->hasIncompatibleLicenseTypeAndSplashScreenSetting())
|
||||
setWarningVisible (ProjectMessages::Ids::incompatibleLicense);
|
||||
|
||||
if (project->isFileModificationCheckPending())
|
||||
setWarningVisible (ProjectMessages::Ids::jucerFileModified);
|
||||
};
|
||||
|
||||
updateExporterButton();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue