Browse Source

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

tags/2021-05-28
ed 7 years ago
parent
commit
f96145682a
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp

+ 8
- 2
extras/Projucer/Source/ComponentEditor/jucer_JucerDocument.cpp 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;
}


Loading…
Cancel
Save