mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Disable project saving when file modification warning is showing
This commit is contained in:
parent
f6782fe25b
commit
a3af3a5381
3 changed files with 30 additions and 13 deletions
|
|
@ -277,13 +277,22 @@ void HeaderComponent::initialiseButtons()
|
|||
{
|
||||
if (project != nullptr)
|
||||
{
|
||||
if (project->hasIncompatibleLicenseTypeAndSplashScreenSetting())
|
||||
if (project->isSaveAndExportDisabled())
|
||||
{
|
||||
auto child = project->getProjectMessages().getChildWithName (ProjectMessages::Ids::warning)
|
||||
.getChildWithName (ProjectMessages::Ids::incompatibleLicense);
|
||||
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 (child.isValid())
|
||||
child.setProperty (ProjectMessages::Ids::isVisible, true, nullptr);
|
||||
};
|
||||
|
||||
if (project->hasIncompatibleLicenseTypeAndSplashScreenSetting())
|
||||
setWarningVisible (ProjectMessages::Ids::incompatibleLicense);
|
||||
|
||||
if (project->isFileModificationCheckPending())
|
||||
setWarningVisible (ProjectMessages::Ids::jucerFileModified);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue