[LYN-4410] Back buttons should preserve selected gems (#1359)
This commit is contained in:
@@ -77,6 +77,7 @@ namespace O3DE::ProjectManager
|
|||||||
return ProjectManagerScreen::CreateProject;
|
return ProjectManagerScreen::CreateProject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called when pressing "Create New Project"
|
||||||
void CreateProjectCtrl::NotifyCurrentScreen()
|
void CreateProjectCtrl::NotifyCurrentScreen()
|
||||||
{
|
{
|
||||||
ScreenWidget* currentScreen = reinterpret_cast<ScreenWidget*>(m_stack->currentWidget());
|
ScreenWidget* currentScreen = reinterpret_cast<ScreenWidget*>(m_stack->currentWidget());
|
||||||
@@ -84,6 +85,11 @@ namespace O3DE::ProjectManager
|
|||||||
{
|
{
|
||||||
currentScreen->NotifyCurrentScreen();
|
currentScreen->NotifyCurrentScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Gather the gems from the project template. When we will have multiple project templates, we need to re-gather them
|
||||||
|
// on changing the template and let the user know that any further changes on top of the template will be lost.
|
||||||
|
QString projectTemplatePath = m_newProjectSettingsScreen->GetProjectTemplatePath();
|
||||||
|
m_gemCatalogScreen->ReinitForProject(projectTemplatePath + "/Template", /*isNewProject=*/true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateProjectCtrl::HandleBackButton()
|
void CreateProjectCtrl::HandleBackButton()
|
||||||
@@ -151,9 +157,6 @@ namespace O3DE::ProjectManager
|
|||||||
{
|
{
|
||||||
m_stack->setCurrentIndex(m_stack->currentIndex() + 1);
|
m_stack->setCurrentIndex(m_stack->currentIndex() + 1);
|
||||||
|
|
||||||
QString projectTemplatePath = m_newProjectSettingsScreen->GetProjectTemplatePath();
|
|
||||||
m_gemCatalogScreen->ReinitForProject(projectTemplatePath + "/Template", /*isNewProject=*/true);
|
|
||||||
|
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -89,17 +89,18 @@ namespace O3DE::ProjectManager
|
|||||||
return ProjectManagerScreen::UpdateProject;
|
return ProjectManagerScreen::UpdateProject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called when pressing "Edit Project Settings..."
|
||||||
void UpdateProjectCtrl::NotifyCurrentScreen()
|
void UpdateProjectCtrl::NotifyCurrentScreen()
|
||||||
{
|
{
|
||||||
m_stack->setCurrentIndex(ScreenOrder::Settings);
|
m_stack->setCurrentIndex(ScreenOrder::Settings);
|
||||||
Update();
|
Update();
|
||||||
|
|
||||||
|
// Gather the available gems that will be shown in the gem catalog.
|
||||||
|
m_gemCatalogScreen->ReinitForProject(m_projectInfo.m_path, /*isNewProject=*/false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateProjectCtrl::HandleGemsButton()
|
void UpdateProjectCtrl::HandleGemsButton()
|
||||||
{
|
{
|
||||||
// The next page is the gem catalog. Gather the available gems that will be shown in the gem catalog.
|
|
||||||
m_gemCatalogScreen->ReinitForProject(m_projectInfo.m_path, /*isNewProject=*/false);
|
|
||||||
|
|
||||||
m_stack->setCurrentWidget(m_gemCatalogScreen);
|
m_stack->setCurrentWidget(m_gemCatalogScreen);
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user