feat: allow deselecting mods from the mod confirmation dialog
This adds a checkbox to each mod on the dialog that shows up when confirming the mods to download, so you can deselect some of those if you want to.
This commit is contained in:
parent
9a0d6124f3
commit
613f2fc447
4 changed files with 71 additions and 67 deletions
|
@ -77,18 +77,20 @@ void ModDownloadDialog::confirm()
|
|||
auto keys = modTask.keys();
|
||||
keys.sort(Qt::CaseInsensitive);
|
||||
|
||||
auto confirm_dialog = ReviewMessageBox::create(
|
||||
this,
|
||||
tr("Confirm mods to download")
|
||||
);
|
||||
auto confirm_dialog = ReviewMessageBox::create(this, tr("Confirm mods to download"));
|
||||
|
||||
for(auto& task : keys){
|
||||
confirm_dialog->appendMod(task, modTask.find(task).value()->getFilename());
|
||||
for (auto& task : keys) {
|
||||
confirm_dialog->appendMod({ task, modTask.find(task).value()->getFilename() });
|
||||
}
|
||||
|
||||
connect(confirm_dialog, &QDialog::accepted, this, &ModDownloadDialog::accept);
|
||||
if (confirm_dialog->exec()) {
|
||||
auto deselected = confirm_dialog->deselectedMods();
|
||||
for (auto name : deselected) {
|
||||
modTask.remove(name);
|
||||
}
|
||||
|
||||
confirm_dialog->open();
|
||||
this->accept();
|
||||
}
|
||||
}
|
||||
|
||||
void ModDownloadDialog::accept()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue