From 049a7e2efd4a42437cc6e06b59d9a28cc65457bc Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Wed, 20 Sep 2023 20:44:20 -0500 Subject: Dialogs and bugfixes --- src/modlistviewactions.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/modlistviewactions.cpp') diff --git a/src/modlistviewactions.cpp b/src/modlistviewactions.cpp index a86c9067..fd2f5c68 100644 --- a/src/modlistviewactions.cpp +++ b/src/modlistviewactions.cpp @@ -262,6 +262,21 @@ void ModListViewActions::checkModsForUpdates() const void ModListViewActions::assignCategories() const { + if (!GlobalSettings::hideAssignCategoriesQuestion()) { + QMessageBox warning; + warning.setWindowTitle(tr("Are you sure?")); + warning.setText( + tr("This action will remove any existing categories on any mod with a valid " + "Nexus category mapping. Are you certain you want to proceed?")); + warning.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel); + QCheckBox dontShow(tr("&Don't show this again")); + warning.setCheckBox(&dontShow); + auto result = warning.exec(); + if (dontShow.isChecked()) + GlobalSettings::setHideAssignCategoriesQuestion(true); + if (result == QMessageBox::Cancel) + return; + } for (auto mod : m_core.modList()->allMods()) { ModInfo::Ptr modInfo = ModInfo::getByName(mod); QString file = modInfo->installationFile(); @@ -269,7 +284,7 @@ void ModListViewActions::assignCategories() const if (!nexusCategory) { auto download = m_core.downloadManager()->getDownloadIndex(file); if (download >= 0) { - int nexusCategory = m_core.downloadManager()->getCategoryID(download); + nexusCategory = m_core.downloadManager()->getCategoryID(download); } } int newCategory = CategoryFactory::instance()->resolveNexusID(nexusCategory); -- cgit v1.3.1