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

Projucer: Ensure that new the project window is opened if reopening previous projects fails

This commit is contained in:
ed 2018-02-26 10:10:27 +00:00
parent dcfd2316bf
commit 4d24d125fe

View file

@ -526,8 +526,15 @@ bool MainWindowList::openFile (const File& file, bool openInBackground)
auto* w = getOrCreateEmptyWindow();
bool ok = w->openFile (file);
w->makeVisible();
avoidSuperimposedWindows (w);
if (ok)
{
w->makeVisible();
avoidSuperimposedWindows (w);
}
else
{
closeWindow (w);
}
if (openInBackground && (previousFrontWindow != nullptr))
previousFrontWindow->toFront (true);