summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-12-31 07:20:28 +0100
committerPetr Mrázek <peterix@gmail.com>2017-12-31 07:20:28 +0100
commit7cd13302c5bfc7c007b3032ca453679f233d10e4 (patch)
treea70d510db79111747de1d03ed1a0f3b4245e97a9
parent4340068a84d1532d9f5ca4de4d12cbf1b7a7bd52 (diff)
downloadMultiMC-7cd13302c5bfc7c007b3032ca453679f233d10e4.tar
MultiMC-7cd13302c5bfc7c007b3032ca453679f233d10e4.tar.gz
MultiMC-7cd13302c5bfc7c007b3032ca453679f233d10e4.tar.lz
MultiMC-7cd13302c5bfc7c007b3032ca453679f233d10e4.tar.xz
MultiMC-7cd13302c5bfc7c007b3032ca453679f233d10e4.zip
NOISSUE only show pack import warnings when there are some
-rw-r--r--application/MainWindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index ba7c0dae..dc2379a7 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -1243,7 +1243,11 @@ void MainWindow::runModalTask(Task *task)
});
connect(task, &Task::succeeded, [this, task]()
{
- CustomMessageBox::selectable(this, tr("Warnings"), task->warnings().join('\n'), QMessageBox::Warning)->show();
+ QStringList warnings = task->warnings();
+ if(warnings.count())
+ {
+ CustomMessageBox::selectable(this, tr("Warnings"), warnings.join('\n'), QMessageBox::Warning)->show();
+ }
});
ProgressDialog loadDialog(this);
loadDialog.setSkipButton(true, tr("Abort"));