diff --git a/Code/Tools/ProjectManager/Source/DownloadWorker.cpp b/Code/Tools/ProjectManager/Source/DownloadWorker.cpp index 5f5c64987b..a71a8dd486 100644 --- a/Code/Tools/ProjectManager/Source/DownloadWorker.cpp +++ b/Code/Tools/ProjectManager/Source/DownloadWorker.cpp @@ -25,7 +25,9 @@ namespace O3DE::ProjectManager m_downloadProgress = downloadProgress; emit UpdateProgress(downloadProgress); }; - AZ::Outcome gemInfoResult = PythonBindingsInterface::Get()->DownloadGem(m_gemName, gemDownloadProgress, true); + AZ::Outcome gemInfoResult = + PythonBindingsInterface::Get()->DownloadGem(m_gemName, gemDownloadProgress, /*force*/true); + if (gemInfoResult.IsSuccess()) { emit Done(""); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp index 3a513fdc1d..cff9a28db3 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp @@ -106,7 +106,7 @@ namespace O3DE::ProjectManager FillModel(projectPath); - m_proxyModel->ResetFilters(); + m_proxyModel->ResetFilters(false); m_proxyModel->sort(/*column=*/0); if (m_filterWidget) @@ -235,7 +235,7 @@ namespace O3DE::ProjectManager m_proxyModel->sort(/*column=*/0); // temporary, until we can refresh filter counts - m_proxyModel->ResetFilters(); + m_proxyModel->ResetFilters(false); m_filterWidget->ResetAllFilters(); // Reselect the same selection to proc UI updates @@ -323,15 +323,15 @@ namespace O3DE::ProjectManager { QMessageBox::critical( this, tr("Operation failed"), - tr("Failed to refresh gem repo %1
Error:
%2").arg(selectedGemRepoUri, refreshResult.GetError().c_str())); + tr("Failed to refresh gem repository %1
Error:
%2").arg(selectedGemRepoUri, refreshResult.GetError().c_str())); } } // If repo uri isn't specified warn user that repo might not be refreshed else { int result = QMessageBox::warning( - this, tr("Gem Repo Unspecified"), - tr("The repo for %1 is unspecfied. Repo cannot be automatically refreshed. " + this, tr("Gem Repository Unspecified"), + tr("The repo for %1 is unspecfied. Repository cannot be automatically refreshed. " "Please ensure this gem's repo is refreshed before attempting to update.") .arg(selectedDisplayGemName), QMessageBox::Cancel, QMessageBox::Ok); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp index 32d0e2fee9..a32492cf1e 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp @@ -204,9 +204,12 @@ namespace O3DE::ProjectManager emit OnInvalidated(); } - void GemSortFilterProxyModel::ResetFilters() + void GemSortFilterProxyModel::ResetFilters(bool clearSearchString) { - m_searchString.clear(); + if (clearSearchString) + { + m_searchString.clear(); + } m_gemSelectedFilter = GemSelected::NoFilter; m_gemActiveFilter = GemActive::NoFilter; m_gemOriginFilter = {}; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h index ab739e62f9..0c58d66ccf 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h @@ -70,7 +70,7 @@ namespace O3DE::ProjectManager void SetFeatures(const QSet& features) { m_featureFilter = features; InvalidateFilter(); } void InvalidateFilter(); - void ResetFilters(); + void ResetFilters(bool clearSearchString = true); signals: void OnInvalidated(); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp index dab4a2a0fe..3e68c597de 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp @@ -30,8 +30,8 @@ namespace O3DE::ProjectManager setLayout(layout); // Body - QLabel* subTitleLabel = new QLabel(tr("%1Update to the latest version of %2?").arg( - updateAvaliable ? "" : tr("Force "), gemName)); + QLabel* subTitleLabel = new QLabel(tr("%1 to the latest version of %2?").arg( + updateAvaliable ? tr("Update") : tr("Force update"), gemName)); subTitleLabel->setObjectName("gemCatalogDialogSubTitle"); layout->addWidget(subTitleLabel); @@ -46,7 +46,7 @@ namespace O3DE::ProjectManager bodyLabel->setFixedSize(QSize(440, 80)); layout->addWidget(bodyLabel); - layout->addSpacing(40); + layout->addSpacing(); // Buttons QDialogButtonBox* dialogButtons = new QDialogButtonBox(); diff --git a/scripts/o3de/o3de/repo.py b/scripts/o3de/o3de/repo.py index 1462015630..c8fac38605 100644 --- a/scripts/o3de/o3de/repo.py +++ b/scripts/o3de/o3de/repo.py @@ -74,11 +74,11 @@ def process_add_o3de_repo(file_name: str or pathlib.Path, manifest_json_uri = f'{o3de_object_uri}/{manifest_json}' manifest_json_sha256 = hashlib.sha256(manifest_json_uri.encode()) cache_file = cache_folder / str(manifest_json_sha256.hexdigest() + '.json') - if cache_file.is_file(): - parsed_uri = urllib.parse.urlparse(manifest_json_uri) - download_file_result = utils.download_file(parsed_uri, cache_file, True) - if download_file_result != 0: - return download_file_result + + parsed_uri = urllib.parse.urlparse(manifest_json_uri) + download_file_result = utils.download_file(parsed_uri, cache_file, True) + if download_file_result != 0: + return download_file_result # Having a repo is also optional repo_list = []