| 560 | } |
| 561 | |
| 562 | void ConfigWindow::on_removeExtraParam_toolButton_clicked() |
| 563 | { |
| 564 | QVector<int> toBeRemoved; |
| 565 | for (auto& range : ui->extraParams_tableWidget->selectedRanges()) { |
| 566 | for (int i = range.topRow(); i <= range.bottomRow(); i++) { |
| 567 | toBeRemoved.append(i); |
| 568 | } |
| 569 | } |
| 570 | std::sort(toBeRemoved.begin(), toBeRemoved.end(), std::greater<int>()); |
| 571 | for (auto i : toBeRemoved) { |
| 572 | auto data = ui->extraParams_tableWidget->item(i, 0)->data(Qt::UserRole); |
| 573 | if (!data.isNull()) { |
| 574 | // Re-enable adding of this flag |
| 575 | extraParamDialog->setParamEnabled(qvariant_cast<SolverFlag>(data), true); |
| 576 | } |
| 577 | ui->extraParams_tableWidget->removeRow(i); |
| 578 | } |
| 579 | if (!toBeRemoved.isEmpty()) { |
| 580 | resizeExtraFlagsTable(); |
| 581 | invalidate(false); |
| 582 | } |
| 583 | } |
| 584 | |
| 585 | void ConfigWindow::on_extraParams_tableWidget_itemSelectionChanged() |
| 586 | { |
nothing calls this directly
no test coverage detected