fix manual inpsection window

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-09-02 17:32:53 -07:00
parent 6cc627a643
commit 3822f92882
3 changed files with 14 additions and 9 deletions
@@ -315,11 +315,11 @@ namespace ScriptCanvasBuilder
else
{
// force load all dependencies into memory
for (auto& dependency : m_processEditorAssetDependencies)
{
auto depAsset = AZ::Data::AssetManager::Instance().GetAsset(dependency.m_assetId, dependency.m_assetType, AZ::Data::AssetLoadBehavior::PreLoad);
depAsset.BlockUntilLoadComplete();
}
// for (auto& dependency : m_processEditorAssetDependencies)
// {
// auto depAsset = AZ::Data::AssetManager::Instance().GetAsset(dependency.m_assetId, dependency.m_assetType, AZ::Data::AssetLoadBehavior::PreLoad);
// depAsset.BlockUntilLoadComplete();
// }
AZ::Entity* buildEntity = asset.Get()->GetScriptCanvasEntity();
@@ -515,13 +515,13 @@ namespace ScriptCanvasEditor
ScriptCanvas::Grammar::g_saveRawTranslationOuputToFile = saveRawTranslationOuputToFile;
if (validationResults.HasResults())
if (validationResults.HasErrors())
{
AZ::Interface<IUpgradeRequests>::Get()->GraphNeedsManualUpgrade(sm->m_asset.GetId());
for (auto& err : validationResults.GetEvents())
{
// Register this graph as needing manual updates
AZ::Interface<IUpgradeRequests>::Get()->GraphNeedsManualUpgrade(sm->m_asset.GetId());
Log("%s: %s\n", err->GetIdentifier().c_str(), err->GetDescription().data());
}
}
@@ -230,7 +230,7 @@ namespace ScriptCanvasEditor
m_upgradeComplete = false;
}
if (!IsUpgrading())
if (!IsUpgrading() && m_state == ProcessState::Upgrade)
{
AZStd::string errorMessage = BackupGraph(*m_inProgressAsset);
// Make the backup
@@ -616,6 +616,11 @@ namespace ScriptCanvasEditor
}
}
if (m_upgradeResult == OperationResult::Failure)
{
AZ::Interface<IUpgradeRequests>::Get()->GraphNeedsManualUpgrade(asset.GetId());
}
m_tmpFileName.clear();
}