1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-19 01:04:20 +00:00

Projucer: Mark modified files with an asterisk in the file tree panel

This commit is contained in:
ed 2018-05-21 17:03:46 +01:00
parent c967a398fb
commit eed45b7462
9 changed files with 72 additions and 5 deletions

View file

@ -1574,6 +1574,23 @@ bool Project::Item::isIconCrossedOut() const
|| getFile().hasFileExtension (headerFileExtensions));
}
bool Project::Item::needsSaving() const noexcept
{
auto& odm = ProjucerApplication::getApp().openDocumentManager;
if (odm.anyFilesNeedSaving())
{
for (int i = 0; i < odm.getNumOpenDocuments(); ++i)
{
auto* doc = odm.getOpenDocument (i);
if (doc->needsSaving() && doc->getFile() == getFile())
return true;
}
}
return false;
}
//==============================================================================
ValueTree Project::getConfigNode()
{