1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Don't exit if trying to open a project that no longer exists on startup

This commit is contained in:
ed 2018-07-26 09:45:27 +01:00
parent c623805a29
commit c39475019d
2 changed files with 5 additions and 1 deletions

View file

@ -628,7 +628,7 @@ void MainWindowList::closeWindow (MainWindow* w)
jassert (windows.contains (w));
#if ! JUCE_MAC
if (windows.size() == 1)
if (windows.size() == 1 && ! isInReopenLastProjects)
{
JUCEApplicationBase::getInstance()->systemRequestedQuit();
}
@ -829,6 +829,8 @@ void MainWindowList::saveCurrentlyOpenProjectList()
void MainWindowList::reopenLastProjects()
{
const ScopedValueSetter<bool> setter (isInReopenLastProjects, true);
for (auto& p : getAppSettings().getLastProjects())
openFile (p, true);
}

View file

@ -125,5 +125,7 @@ public:
OwnedArray<MainWindow> windows;
private:
bool isInReopenLastProjects = false;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindowList)
};