mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Fixed a crash when creating new projects without using global paths and hide UI elements correctly when closing projects
This commit is contained in:
parent
faed5b237b
commit
6ce02ad35f
6 changed files with 27 additions and 37 deletions
|
|
@ -175,10 +175,7 @@ void ProjectContentComponent::setProject (Project* newProject)
|
|||
deleteProjectTabs();
|
||||
project = newProject;
|
||||
|
||||
if (project != nullptr)
|
||||
rebuildProjectTabs();
|
||||
|
||||
projectMessagesComponent.setProject (newProject);
|
||||
rebuildProjectUI();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -238,7 +235,7 @@ void ProjectContentComponent::deleteProjectTabs()
|
|||
sidebarTabs.clearTabs();
|
||||
}
|
||||
|
||||
void ProjectContentComponent::rebuildProjectTabs()
|
||||
void ProjectContentComponent::rebuildProjectUI()
|
||||
{
|
||||
deleteProjectTabs();
|
||||
|
||||
|
|
@ -280,13 +277,18 @@ void ProjectContentComponent::rebuildProjectTabs()
|
|||
|
||||
headerComponent.setVisible (true);
|
||||
headerComponent.setCurrentProject (project);
|
||||
|
||||
projectMessagesComponent.setVisible (true);
|
||||
}
|
||||
else
|
||||
{
|
||||
sidebarTabs.setVisible (false);
|
||||
headerComponent.setVisible (false);
|
||||
projectMessagesComponent.setVisible (false);
|
||||
}
|
||||
|
||||
projectMessagesComponent.setProject (project);
|
||||
|
||||
resized();
|
||||
}
|
||||
|
||||
|
|
@ -1203,7 +1205,7 @@ void ProjectContentComponent::refreshTabsIfBuildStatusChanged()
|
|||
&& isLiveBuildEnabled
|
||||
&& (sidebarTabs.getNumTabs() < 2 || isBuildEnabled() != isBuildTabEnabled()))
|
||||
{
|
||||
rebuildProjectTabs();
|
||||
rebuildProjectUI();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1315,7 +1317,7 @@ void ProjectContentComponent::liveBuildEnablementChanged (bool isEnabled)
|
|||
if (! isLiveBuildEnabled)
|
||||
killChildProcess();
|
||||
|
||||
rebuildProjectTabs();
|
||||
rebuildProjectUI();
|
||||
headerComponent.liveBuildEnablementChanged (isLiveBuildEnabled);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue