NOISSUE only show pack import warnings when there are some

This commit is contained in:
Petr Mrázek 2017-12-31 07:20:28 +01:00
parent 4340068a84
commit 7cd13302c5

View File

@ -1243,7 +1243,11 @@ void MainWindow::runModalTask(Task *task)
}); });
connect(task, &Task::succeeded, [this, 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); ProgressDialog loadDialog(this);
loadDialog.setSkipButton(true, tr("Abort")); loadDialog.setSkipButton(true, tr("Abort"));