mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Only resave project if necessary
This commit is contained in:
parent
65a20c63ee
commit
809252736b
1 changed files with 9 additions and 7 deletions
|
|
@ -512,13 +512,15 @@ void ProjectContentComponent::openInSelectedIDE (bool saveFirst)
|
|||
return;
|
||||
}
|
||||
|
||||
SafePointer<ProjectContentComponent> safeThis { this };
|
||||
project->saveAsync (true, true, [safeThis] (Project::SaveResult r)
|
||||
{
|
||||
if (safeThis != nullptr && r == Project::SaveResult::savedOk)
|
||||
safeThis->openInSelectedIDE (false);
|
||||
});
|
||||
return;
|
||||
if (project->hasChangedSinceSaved())
|
||||
{
|
||||
project->saveAsync (true, true, [safeThis = SafePointer<ProjectContentComponent> { this }] (Project::SaveResult r)
|
||||
{
|
||||
if (safeThis != nullptr && r == Project::SaveResult::savedOk)
|
||||
safeThis->openInSelectedIDE (false);
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
project->openProjectInIDE (*selectedExporter);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue