allow deletion of multiple measurements at once

This commit is contained in:
Jan Käberich 2021-12-05 18:30:08 +01:00
parent aba0650d25
commit b2d3c407fc

View File

@ -145,9 +145,11 @@ void CalibrationTraceDialog::UpdateCalibrationStatus()
void CalibrationTraceDialog::on_bDelete_clicked() void CalibrationTraceDialog::on_bDelete_clicked()
{ {
auto measurement = measurements[ui->tableView->currentIndex().row()]; auto selected = ui->tableView->selectionModel()->selectedRows();
cal->clearMeasurement(measurement); for(auto s : selected) {
model->measurementUpdated(measurement); cal->clearMeasurement(measurements[s.row()]);
model->measurementUpdated(measurements[s.row()]);
}
UpdateCalibrationStatus(); UpdateCalibrationStatus();
} }