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