diff options
author | Alex <robotbrain@robotbrain.info> | 2015-08-31 15:34:15 -0400 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-09-06 16:00:07 +0200 |
commit | 498dc8fc03fea41e089238f234a101cce5464178 (patch) | |
tree | 9bb7ab9fd9403136aba9da3cc84e2f9399cb78e6 /application | |
parent | c3480d6fe49610fbddc9d75f9307f7afe848bb08 (diff) | |
download | MultiMC-498dc8fc03fea41e089238f234a101cce5464178.tar MultiMC-498dc8fc03fea41e089238f234a101cce5464178.tar.gz MultiMC-498dc8fc03fea41e089238f234a101cce5464178.tar.lz MultiMC-498dc8fc03fea41e089238f234a101cce5464178.tar.xz MultiMC-498dc8fc03fea41e089238f234a101cce5464178.zip |
Add confirmation dialog for world deletion
Diffstat (limited to 'application')
-rw-r--r-- | application/pages/WorldListPage.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/application/pages/WorldListPage.cpp b/application/pages/WorldListPage.cpp index 0cdcd404..ea9e77cf 100644 --- a/application/pages/WorldListPage.cpp +++ b/application/pages/WorldListPage.cpp @@ -19,6 +19,7 @@ #include "dialogs/ModEditDialogCommon.h" #include <QEvent> #include <QKeyEvent> +#include <QMessageBox> WorldListPage::WorldListPage(BaseInstance *inst, std::shared_ptr<WorldList> worlds, QString id, QString iconName, QString displayName, QString helpPage, @@ -85,6 +86,17 @@ void WorldListPage::on_rmWorldBtn_clicked() if (!lastfirst(list, first, last)) return; + + auto result = QMessageBox::question(this, + tr("Are you sure?"), + tr("This will remove the selected world permenantly.\n" + "The world will be gone forever (A LONG TIME).\n" + "\n" + "Do you want to continue?"), + tr("I understand, continue."), tr("Cancel"), QString(), 1, 1 + ); + if(result != 0) + return; m_worlds->stopWatching(); m_worlds->deleteWorlds(first, last); m_worlds->startWatching(); |