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

Projucer: Open example files in new window

This commit is contained in:
ed 2020-07-08 15:43:16 +01:00
parent 9bc5cb8c08
commit 7ce8cc32e9
2 changed files with 4 additions and 3 deletions

View file

@ -707,7 +707,7 @@ void ProjucerApplication::findAndLaunchExample (int selectedIndex)
// example doesn't exist?
jassert (example != File());
mainWindowList.openFile (example);
openFile (example);
}
//==============================================================================
@ -1176,7 +1176,7 @@ void ProjucerApplication::createNewProjectFromClipboard()
{
errorString = "Clipboard does not contain a valid PIP.";
}
else if (! mainWindowList.openFile (tempFile))
else if (! openFile (tempFile))
{
errorString = "Couldn't create project from clipboard contents.";
mainWindowList.closeWindow (mainWindowList.windows.getLast());

View file

@ -666,7 +666,8 @@ bool MainWindowList::openFile (const File& file, bool openInBackground)
}
}
if (file.hasFileExtension (Project::projectFileExtension))
if (file.hasFileExtension (Project::projectFileExtension)
|| isPIPFile (file))
{
WeakReference<Component> previousFrontWindow (getFrontmostWindow());