| 91 | } |
| 92 | |
| 93 | void ResourceDownloadDialog::reject() |
| 94 | { |
| 95 | auto selected = getTasks(); |
| 96 | if (selected.count() > 0) { |
| 97 | auto reply = CustomMessageBox::selectable(this, tr("Confirmation Needed"), |
| 98 | tr("You have %1 selected resources.\n" |
| 99 | "Are you sure you want to close this dialog?") |
| 100 | .arg(selected.count()), |
| 101 | QMessageBox::Question, QMessageBox::Yes | QMessageBox::No, QMessageBox::No) |
| 102 | ->exec(); |
| 103 | if (reply != QMessageBox::Yes) { |
| 104 | return; |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | if (!geometrySaveKey().isEmpty()) |
| 109 | APPLICATION->settings()->set(geometrySaveKey(), saveGeometry().toBase64()); |
| 110 | |
| 111 | QDialog::reject(); |
| 112 | } |
| 113 | |
| 114 | // NOTE: We can't have this in the ctor because PageContainer calls a virtual function, and so |
| 115 | // won't work with subclasses if we put it in this ctor. |