aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackExportTask.cpp8
-rw-r--r--launcher/ui/dialogs/ExportMrPackDialog.cpp3
2 files changed, 8 insertions, 3 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
index c151edf5..5ddd3408 100644
--- a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
+++ b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
@@ -54,8 +54,12 @@ void ModrinthPackExportTask::executeTask()
}
bool ModrinthPackExportTask::abort() {
- if (!task.isNull())
- return task->abort();
+ if (!task.isNull() && task->abort()) {
+ task = nullptr;
+ emitFailed(tr("Aborted"));
+ return true;
+ }
+
return false;
}
diff --git a/launcher/ui/dialogs/ExportMrPackDialog.cpp b/launcher/ui/dialogs/ExportMrPackDialog.cpp
index 266479b3..13262a7e 100644
--- a/launcher/ui/dialogs/ExportMrPackDialog.cpp
+++ b/launcher/ui/dialogs/ExportMrPackDialog.cpp
@@ -70,7 +70,8 @@ void ExportMrPackDialog::done(int result)
ProgressDialog progress(this);
progress.setSkipButton(true, tr("Abort"));
- progress.execWithTask(&task);
+ if (progress.execWithTask(&task) != QDialog::Accepted)
+ return;
}
QDialog::done(result);