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

Introjucer: More avoiding of recursive project saving.

This commit is contained in:
jules 2015-08-26 16:38:52 +01:00
parent fa0d2574e9
commit 323bce7282
2 changed files with 8 additions and 1 deletions

View file

@ -35,7 +35,8 @@ Project::Project (const File& f)
String ("*") + projectFileExtension,
"Choose a Jucer project to load",
"Save Jucer project"),
projectRoot (Ids::JUCERPROJECT)
projectRoot (Ids::JUCERPROJECT),
isSaving (false)
{
Logger::writeToLog ("Loading project: " + f.getFullPathName());
setFile (f);
@ -285,12 +286,17 @@ Result Project::saveDocument (const File& file)
Result Project::saveProject (const File& file, bool isCommandLineApp)
{
if (isSaving)
return Result::ok();
updateProjectSettings();
sanitiseConfigFlags();
if (! isCommandLineApp)
registerRecentFile (file);
const ScopedValueSetter<bool> vs (isSaving, true, false);
ProjectSaver saver (*this, file);
return saver.save (! isCommandLineApp);
}