mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Moved some project initialisation from the Project constructor into its loadDocument() method after the projectRoot has been set
This commit is contained in:
parent
d179e67052
commit
0075208fb4
2 changed files with 13 additions and 19 deletions
|
|
@ -41,27 +41,14 @@ Project::Project (const File& f)
|
|||
"Save Jucer project")
|
||||
{
|
||||
Logger::writeToLog ("Loading project: " + f.getFullPathName());
|
||||
setFile (f);
|
||||
|
||||
removeDefunctExporters();
|
||||
exporterPathsModuleList.reset (new AvailableModuleList());
|
||||
updateOldModulePaths();
|
||||
updateOldStyleConfigList();
|
||||
setCppVersionFromOldExporterSettings();
|
||||
moveOldPropertyFromProjectToAllExporters (Ids::bigIcon);
|
||||
moveOldPropertyFromProjectToAllExporters (Ids::smallIcon);
|
||||
setFile (f);
|
||||
|
||||
initialiseProjectValues();
|
||||
initialiseMainGroup();
|
||||
initialiseAudioPluginValues();
|
||||
|
||||
parsedPreprocessorDefs = parsePreprocessorDefs (preprocessorDefsValue.get());
|
||||
|
||||
getEnabledModules().sortAlphabetically();
|
||||
|
||||
projectRoot.addListener (this);
|
||||
|
||||
compileEngineSettings.reset (new CompileEngineSettings (projectRoot));
|
||||
exporterPathsModuleList.reset (new AvailableModuleList());
|
||||
|
||||
setChangedFlag (false);
|
||||
modificationTime = getFile().getLastModificationTime();
|
||||
|
|
@ -579,7 +566,9 @@ Result Project::loadDocument (const File& file)
|
|||
registerRecentFile (file);
|
||||
|
||||
enabledModuleList.reset();
|
||||
|
||||
projectRoot = newTree;
|
||||
projectRoot.addListener (this);
|
||||
|
||||
initialiseProjectValues();
|
||||
initialiseMainGroup();
|
||||
|
|
@ -591,8 +580,15 @@ Result Project::loadDocument (const File& file)
|
|||
|
||||
parsedPreprocessorDefs = parsePreprocessorDefs (preprocessorDefsValue.get());
|
||||
|
||||
setCppVersionFromOldExporterSettings();
|
||||
|
||||
removeDefunctExporters();
|
||||
updateOldModulePaths();
|
||||
updateOldStyleConfigList();
|
||||
moveOldPropertyFromProjectToAllExporters (Ids::bigIcon);
|
||||
moveOldPropertyFromProjectToAllExporters (Ids::smallIcon);
|
||||
getEnabledModules().sortAlphabetically();
|
||||
|
||||
setChangedFlag (false);
|
||||
|
||||
if (! ProjucerApplication::getApp().isRunningCommandLine)
|
||||
|
|
|
|||
|
|
@ -422,13 +422,11 @@ public:
|
|||
}
|
||||
|
||||
auto projectDir = fileBrowser.getSelectedFile (0);
|
||||
std::unique_ptr<Project> project (wizard->runWizard (*this, projectName.getText(),
|
||||
projectDir,
|
||||
modulesPathBox.isUsingGlobalPaths));
|
||||
std::unique_ptr<Project> project (wizard->runWizard (*this, projectName.getText(), projectDir, modulesPathBox.isUsingGlobalPaths));
|
||||
|
||||
if (project != nullptr)
|
||||
{
|
||||
mw->setProject (std::move (project));
|
||||
mw->openFile (project->getFile());
|
||||
getAppSettings().lastWizardFolder = projectDir.getParentDirectory();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue