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/installationmanager.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/installationmanager.cpp') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 901c636c..3f247b38 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -667,20 +667,21 @@ InstallationResult InstallationManager::install(const QString& fileName, if (category != 0 && categoryIndex == 0U && Settings::instance().nexus().categoryMappings()) { QMessageBox nexusQuery; + nexusQuery.setWindowTitle(tr("No category found")); nexusQuery.setText(tr( "This Nexus category has not yet been mapped. Do you wish to proceed without " "setting a category, proceed and disable automatic Nexus mappings, or stop " "and configure your category mappings?")); - nexusQuery.addButton(tr("&Proceed"), QMessageBox::YesRole); - nexusQuery.addButton(tr("&Disable"), QMessageBox::AcceptRole); - nexusQuery.addButton(tr("&Stop && Configure"), QMessageBox::DestructiveRole); - auto ret = nexusQuery.exec(); - switch (ret) { - case 1: + QPushButton* proceedButton = + nexusQuery.addButton(tr("&Proceed"), QMessageBox::YesRole); + QPushButton* disableButton = + nexusQuery.addButton(tr("&Disable"), QMessageBox::AcceptRole); + QPushButton* stopButton = + nexusQuery.addButton(tr("&Stop && Configure"), QMessageBox::DestructiveRole); + nexusQuery.exec(); + if (nexusQuery.clickedButton() == disableButton) { Settings::instance().nexus().setCategoryMappings(false); - case 0: - break; - case 2: + } else if (nexusQuery.clickedButton() == stopButton) { return MOBase::IPluginInstaller::RESULT_CATEGORYREQUESTED; } } else { -- cgit v1.3.1