Dependency confirmation screen and URL display fix
Signed-off-by: AMZN-alexpete <26804013+AMZN-alexpete@users.noreply.github.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <GemCatalog/GemListHeaderWidget.h>
|
||||
#include <GemCatalog/GemSortFilterProxyModel.h>
|
||||
#include <GemCatalog/GemRequirementDialog.h>
|
||||
#include <GemCatalog/GemDependenciesDialog.h>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
@@ -134,7 +135,7 @@ namespace O3DE::ProjectManager
|
||||
}
|
||||
}
|
||||
|
||||
bool GemCatalogScreen::EnableDisableGemsForProject(const QString& projectPath)
|
||||
GemCatalogScreen::EnableDisableGemsResult GemCatalogScreen::EnableDisableGemsForProject(const QString& projectPath)
|
||||
{
|
||||
IPythonBindings* pythonBindings = PythonBindingsInterface::Get();
|
||||
QVector<QModelIndex> toBeAdded = m_gemModel->GatherGemsToBeAdded();
|
||||
@@ -142,15 +143,25 @@ namespace O3DE::ProjectManager
|
||||
|
||||
if (m_gemModel->DoGemsToBeAddedHaveRequirements())
|
||||
{
|
||||
GemRequirementDialog* confirmRequirementsDialog = new GemRequirementDialog(m_gemModel, toBeAdded, this);
|
||||
confirmRequirementsDialog->exec();
|
||||
|
||||
if (confirmRequirementsDialog->GetButtonResult() != QDialogButtonBox::ApplyRole)
|
||||
GemRequirementDialog* confirmRequirementsDialog = new GemRequirementDialog(m_gemModel, this);
|
||||
if(confirmRequirementsDialog->exec() == QDialog::Rejected)
|
||||
{
|
||||
return false;
|
||||
return EnableDisableGemsResult::Cancel;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_gemModel->HasDependentGemsToRemove())
|
||||
{
|
||||
GemDependenciesDialog* dependenciesDialog = new GemDependenciesDialog(m_gemModel, this);
|
||||
if(dependenciesDialog->exec() == QDialog::Rejected)
|
||||
{
|
||||
return EnableDisableGemsResult::Cancel;
|
||||
}
|
||||
|
||||
toBeAdded = m_gemModel->GatherGemsToBeAdded();
|
||||
toBeRemoved = m_gemModel->GatherGemsToBeRemoved();
|
||||
}
|
||||
|
||||
for (const QModelIndex& modelIndex : toBeAdded)
|
||||
{
|
||||
const QString gemPath = GemModel::GetPath(modelIndex);
|
||||
@@ -160,7 +171,7 @@ namespace O3DE::ProjectManager
|
||||
QMessageBox::critical(nullptr, "Operation failed",
|
||||
QString("Cannot add gem %1 to project.\n\nError:\n%2").arg(GemModel::GetDisplayName(modelIndex), result.GetError().c_str()));
|
||||
|
||||
return false;
|
||||
return EnableDisableGemsResult::Failed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,11 +184,11 @@ namespace O3DE::ProjectManager
|
||||
QMessageBox::critical(nullptr, "Operation failed",
|
||||
QString("Cannot remove gem %1 from project.\n\nError:\n%2").arg(GemModel::GetDisplayName(modelIndex), result.GetError().c_str()));
|
||||
|
||||
return false;
|
||||
return EnableDisableGemsResult::Failed;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return EnableDisableGemsResult::Success;
|
||||
}
|
||||
|
||||
ProjectManagerScreen GemCatalogScreen::GetScreenEnum()
|
||||
|
||||
Reference in New Issue
Block a user