Merge pull request #2566 from Trial97/mod_warning
add warnning when user closes the resource download dialog with selec…
This commit is contained in:
commit
3aaa36a2bc
@ -92,6 +92,19 @@ void ResourceDownloadDialog::accept()
|
||||
|
||||
void ResourceDownloadDialog::reject()
|
||||
{
|
||||
auto selected = getTasks();
|
||||
if (selected.count() > 0) {
|
||||
auto reply = CustomMessageBox::selectable(this, tr("Confirmation Needed"),
|
||||
tr("You have %1 selected resources.\n"
|
||||
"Are you sure you want to close this dialog?")
|
||||
.arg(selected.count()),
|
||||
QMessageBox::Question, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
|
||||
->exec();
|
||||
if (reply != QMessageBox::Yes) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!geometrySaveKey().isEmpty())
|
||||
APPLICATION->settings()->set(geometrySaveKey(), saveGeometry().toBase64());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user