diff options
| author | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2023-09-20 20:44:20 -0500 |
|---|---|---|
| committer | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2023-09-21 17:35:08 -0500 |
| commit | 049a7e2efd4a42437cc6e06b59d9a28cc65457bc (patch) | |
| tree | 1949bc3f5bf12c4cf4278bb7c72eefe3250f23b7 /src/modlistviewactions.cpp | |
| parent | f8b015220d7b743bdf6829fae610e7dfe33cf176 (diff) | |
Dialogs and bugfixes
Diffstat (limited to 'src/modlistviewactions.cpp')
| -rw-r--r-- | src/modlistviewactions.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
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); |
