|
|
|
@ -54,6 +54,7 @@ namespace ScriptCanvasEditor
|
|
|
|
m_view->textEdit->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn);
|
|
|
|
m_view->textEdit->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn);
|
|
|
|
connect(m_view->scanButton, &QPushButton::pressed, this, &Controller::OnButtonPressScan);
|
|
|
|
connect(m_view->scanButton, &QPushButton::pressed, this, &Controller::OnButtonPressScan);
|
|
|
|
connect(m_view->closeButton, &QPushButton::pressed, this, &Controller::OnButtonPressClose);
|
|
|
|
connect(m_view->closeButton, &QPushButton::pressed, this, &Controller::OnButtonPressClose);
|
|
|
|
|
|
|
|
m_view->upgradeAllButton->setVisible(false);
|
|
|
|
connect(m_view->upgradeAllButton, &QPushButton::pressed, this, &Controller::OnButtonPressUpgrade);
|
|
|
|
connect(m_view->upgradeAllButton, &QPushButton::pressed, this, &Controller::OnButtonPressUpgrade);
|
|
|
|
m_view->progressBar->setValue(0);
|
|
|
|
m_view->progressBar->setValue(0);
|
|
|
|
m_view->progressBar->setVisible(false);
|
|
|
|
m_view->progressBar->setVisible(false);
|
|
|
|
@ -237,17 +238,13 @@ namespace ScriptCanvasEditor
|
|
|
|
|
|
|
|
|
|
|
|
void Controller::OnUpgradeModificationBegin([[maybe_unused]] const ModifyConfiguration& config, const AZ::Data::AssetInfo& info)
|
|
|
|
void Controller::OnUpgradeModificationBegin([[maybe_unused]] const ModifyConfiguration& config, const AZ::Data::AssetInfo& info)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QList<QTableWidgetItem*> items = FindTableItems(info);
|
|
|
|
for (auto* item : FindTableItems(info))
|
|
|
|
if (!items.isEmpty())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (auto* item : items)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int row = item->row();
|
|
|
|
int row = item->row();
|
|
|
|
SetRowBusy(row);
|
|
|
|
SetRowBusy(row);
|
|
|
|
m_view->tableWidget->setCellWidget(row, ColumnAction, nullptr);
|
|
|
|
m_view->tableWidget->setCellWidget(row, ColumnAction, nullptr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Controller::OnUpgradeModificationEnd
|
|
|
|
void Controller::OnUpgradeModificationEnd
|
|
|
|
( [[maybe_unused]] const ModifyConfiguration& config
|
|
|
|
( [[maybe_unused]] const ModifyConfiguration& config
|
|
|
|
@ -263,8 +260,7 @@ namespace ScriptCanvasEditor
|
|
|
|
VE_LOG("Failed to modify %s: %s", result.assetInfo.m_relativePath.c_str(), result.errorMessage.data());
|
|
|
|
VE_LOG("Failed to modify %s: %s", result.assetInfo.m_relativePath.c_str(), result.errorMessage.data());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QList<QTableWidgetItem*> items = FindTableItems(info);
|
|
|
|
for (auto* item : FindTableItems(info))
|
|
|
|
for (auto* item : items)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int row = item->row();
|
|
|
|
int row = item->row();
|
|
|
|
|
|
|
|
|
|
|
|
@ -439,6 +435,22 @@ namespace ScriptCanvasEditor
|
|
|
|
void Controller::OnUpgradeBegin
|
|
|
|
void Controller::OnUpgradeBegin
|
|
|
|
( const ModifyConfiguration& config
|
|
|
|
( const ModifyConfiguration& config
|
|
|
|
, [[maybe_unused]] const WorkingAssets& assets)
|
|
|
|
, [[maybe_unused]] const WorkingAssets& assets)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QString spinnerText = QStringLiteral("Upgrade in progress - ");
|
|
|
|
|
|
|
|
if (config.modifySingleAsset.m_assetId.IsValid())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
spinnerText.append(" single graph");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (assets.size() == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (auto* item : FindTableItems(assets.front().info))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int row = item->row();
|
|
|
|
|
|
|
|
SetRowBusy(row);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (int row = 0; row < m_view->tableWidget->rowCount(); ++row)
|
|
|
|
for (int row = 0; row < m_view->tableWidget->rowCount(); ++row)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -450,13 +462,6 @@ namespace ScriptCanvasEditor
|
|
|
|
SetRowBusy(row);
|
|
|
|
SetRowBusy(row);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QString spinnerText = QStringLiteral("Upgrade in progress - ");
|
|
|
|
|
|
|
|
if (config.modifySingleAsset.m_assetId.IsValid())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
spinnerText.append(" single graph");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
spinnerText.append(" all scanned graphs");
|
|
|
|
spinnerText.append(" all scanned graphs");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -491,10 +496,7 @@ namespace ScriptCanvasEditor
|
|
|
|
|
|
|
|
|
|
|
|
void Controller::OnUpgradeDependenciesGathered(const AZ::Data::AssetInfo& info, Result result)
|
|
|
|
void Controller::OnUpgradeDependenciesGathered(const AZ::Data::AssetInfo& info, Result result)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QList<QTableWidgetItem*> items = m_view->tableWidget->findItems(info.m_relativePath.c_str(), Qt::MatchFlag::MatchExactly);
|
|
|
|
for (auto* item : FindTableItems(info))
|
|
|
|
if (!items.isEmpty())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (auto* item : items)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int row = item->row();
|
|
|
|
int row = item->row();
|
|
|
|
|
|
|
|
|
|
|
|
@ -512,7 +514,6 @@ namespace ScriptCanvasEditor
|
|
|
|
button->setEnabled(true);
|
|
|
|
button->setEnabled(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_view->progressBar->setVisible(true);
|
|
|
|
m_view->progressBar->setVisible(true);
|
|
|
|
++m_handledAssetCount;
|
|
|
|
++m_handledAssetCount;
|
|
|
|
|