| 223 | } |
| 224 | |
| 225 | void ModPage::onModSelected() |
| 226 | { |
| 227 | if (selectedVersion < 0) |
| 228 | return; |
| 229 | |
| 230 | auto& version = current.versions[selectedVersion]; |
| 231 | if (dialog->isModSelected(current.name, version.fileName)) { |
| 232 | dialog->removeSelectedMod(current.name); |
| 233 | } else { |
| 234 | bool is_indexed = !APPLICATION->settings()->get("ModMetadataDisabled").toBool(); |
| 235 | dialog->addSelectedMod(current.name, new ModDownloadTask(current, version, dialog->mods, is_indexed)); |
| 236 | } |
| 237 | |
| 238 | updateSelectionButton(); |
| 239 | |
| 240 | /* Force redraw on the mods list when the selection changes */ |
| 241 | ui->packView->adjustSize(); |
| 242 | } |
| 243 | |
| 244 | |
| 245 | /******** Make changes to the UI ********/ |
nothing calls this directly
no test coverage detected