|
|
|
|
@ -215,22 +215,23 @@ namespace O3DE::ProjectManager
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update project if settings changed
|
|
|
|
|
// Check if project path has changed and move it
|
|
|
|
|
// Move project first to avoid trying to update settings at the new location before it has been moved there
|
|
|
|
|
if (newProjectSettings.m_path != m_projectInfo.m_path)
|
|
|
|
|
{
|
|
|
|
|
auto result = PythonBindingsInterface::Get()->UpdateProject(newProjectSettings);
|
|
|
|
|
if (!result.IsSuccess())
|
|
|
|
|
if (!ProjectUtils::MoveProject(m_projectInfo.m_path, newProjectSettings.m_path))
|
|
|
|
|
{
|
|
|
|
|
QMessageBox::critical(this, tr("Project update failed"), tr(result.GetError().c_str()));
|
|
|
|
|
QMessageBox::critical(this, tr("Project move failed"), tr("Failed to move project."));
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Check if project path has changed and move it
|
|
|
|
|
if (newProjectSettings.m_path != m_projectInfo.m_path)
|
|
|
|
|
// Update project if settings changed
|
|
|
|
|
{
|
|
|
|
|
if (!ProjectUtils::MoveProject(m_projectInfo.m_path, newProjectSettings.m_path))
|
|
|
|
|
auto result = PythonBindingsInterface::Get()->UpdateProject(newProjectSettings);
|
|
|
|
|
if (!result.IsSuccess())
|
|
|
|
|
{
|
|
|
|
|
QMessageBox::critical(this, tr("Project move failed"), tr("Failed to move project."));
|
|
|
|
|
QMessageBox::critical(this, tr("Project update failed"), tr(result.GetError().c_str()));
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|