1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-26 02:14:22 +00:00

Projucer: Fixed a bug where some files would remain open after selecting the 'Window->Close All Documents' menu item

This commit is contained in:
ed 2017-08-23 10:29:03 +01:00
parent 383c1678ce
commit f96145682a

View file

@ -77,7 +77,7 @@ struct UserDocChangeTimer : public Timer
bool JucerDocument::documentAboutToClose (OpenDocumentManager::Document* doc)
{
return doc != cpp;
return true;
}
void JucerDocument::userEditedCpp()
@ -714,7 +714,13 @@ public:
auto& odm = ProjucerApplication::getApp().openDocumentManager;
if (auto* header = odm.openFile (nullptr, getFile().withFileExtension (".h")))
return header->save();
{
if (header->save())
{
odm.closeFile (getFile().withFileExtension(".h"), false);
return true;
}
}
return false;
}