Create download UI once and update existing UI with progress
Signed-off-by: AMZN-Phil <pconroy@amazon.com>
This commit is contained in:
@@ -41,6 +41,8 @@ namespace O3DE::ProjectManager
|
||||
void DownloadController::AddGemDownload(const QString& gemName)
|
||||
{
|
||||
m_gemNames.push_back(gemName);
|
||||
emit GemDownloadAdded(gemName);
|
||||
|
||||
if (m_gemNames.size() == 1)
|
||||
{
|
||||
m_worker->SetGemToDownload(m_gemNames[0], false);
|
||||
@@ -62,6 +64,7 @@ namespace O3DE::ProjectManager
|
||||
else
|
||||
{
|
||||
m_gemNames.erase(findResult);
|
||||
emit GemDownloadRemoved(gemName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,7 +72,7 @@ namespace O3DE::ProjectManager
|
||||
void DownloadController::UpdateUIProgress(int progress)
|
||||
{
|
||||
m_lastProgress = progress;
|
||||
emit GemDownloadProgress(progress);
|
||||
emit GemDownloadProgress(*m_gemNames.begin(), progress);
|
||||
}
|
||||
|
||||
void DownloadController::HandleResults(const QString& result)
|
||||
@@ -82,8 +85,9 @@ namespace O3DE::ProjectManager
|
||||
succeeded = false;
|
||||
}
|
||||
|
||||
QString gemName = *m_gemNames.begin();
|
||||
m_gemNames.erase(m_gemNames.begin());
|
||||
emit Done(succeeded);
|
||||
emit Done(gemName, succeeded);
|
||||
|
||||
if (!m_gemNames.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user