Browse Source

Projucer: Fixed a bug where PIP files not copied locally wouldn't initially be displayed in the code editor

tags/2021-05-28
ed 8 years ago
parent
commit
c596583e3b
3 changed files with 5 additions and 4 deletions
  1. +3
    -3
      extras/Projucer/Source/Application/jucer_MainWindow.cpp
  2. +1
    -1
      extras/Projucer/Source/Application/jucer_MainWindow.h
  3. +1
    -0
      extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.h

+ 3
- 3
extras/Projucer/Source/Application/jucer_MainWindow.cpp View File

@@ -291,7 +291,7 @@ bool MainWindow::tryToOpenPIP (const File& pipFile)
if (! ProjucerApplication::getApp().mainWindowList.openFile (generator.getJucerFile()))
return false;
openPIP (generator, pipFile.getFileName());
openPIP (generator);
return true;
}
@@ -361,7 +361,7 @@ static int findBestLineToScrollTo (StringArray lines, StringRef className)
return 0;
}
void MainWindow::openPIP (PIPGenerator& generator, StringRef fileName)
void MainWindow::openPIP (PIPGenerator& generator)
{
if (auto* window = ProjucerApplication::getApp().mainWindowList.getMainWindowForFile (generator.getJucerFile()))
{
@@ -378,7 +378,7 @@ void MainWindow::openPIP (PIPGenerator& generator, StringRef fileName)
pcc->invokeDirectly (CommandIDs::buildNow, true);
pcc->invokeDirectly (CommandIDs::toggleContinuousBuild, true);
auto fileToDisplay = project->getSourceFilesFolder().getChildFile (fileName);
auto fileToDisplay = generator.getPIPFile();
if (fileToDisplay != File())
{


+ 1
- 1
extras/Projucer/Source/Application/jucer_MainWindow.h View File

@@ -85,7 +85,7 @@ private:
void createProjectContentCompIfNeeded();
void setTitleBarIcon();
void openPIP (PIPGenerator&, StringRef fileName);
void openPIP (PIPGenerator&);
void valueChanged (Value&) override;


+ 1
- 0
extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.h View File

@@ -37,6 +37,7 @@ public:
//==============================================================================
bool hasValidPIP() const noexcept { return ! metadata[Ids::name].toString().isEmpty(); }
File getJucerFile() noexcept { return outputDirectory.getChildFile (metadata[Ids::name].toString() + ".jucer"); }
File getPIPFile() noexcept { return useLocalCopy ? outputDirectory.getChildFile ("Source").getChildFile (pipFile.getFileName()) : pipFile; }
String getMainClassName() const noexcept { return metadata[Ids::mainClass]; }


Loading…
Cancel
Save