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:
parent
c623805a29
commit
c39475019d
2 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,5 +125,7 @@ public:
|
|||
OwnedArray<MainWindow> windows;
|
||||
|
||||
private:
|
||||
bool isInReopenLastProjects = false;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindowList)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue