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:
parent
fa0d2574e9
commit
323bce7282
2 changed files with 8 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue