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:
parent
c967a398fb
commit
eed45b7462
9 changed files with 72 additions and 5 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue