From 087bd8e4f17d1129889a66798c0c574241db17bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Tue, 5 Mar 2024 18:26:02 +0100 Subject: [PATCH] re-compute calibration when a measurement is updated --- .../LibreVNA-GUI/Calibration/calibration.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Software/PC_Application/LibreVNA-GUI/Calibration/calibration.cpp b/Software/PC_Application/LibreVNA-GUI/Calibration/calibration.cpp index 5ed77687..3c27bb02 100644 --- a/Software/PC_Application/LibreVNA-GUI/Calibration/calibration.cpp +++ b/Software/PC_Application/LibreVNA-GUI/Calibration/calibration.cpp @@ -620,6 +620,15 @@ void Calibration::edit() connect(this, &Calibration::measurementsUpdated, d, [=](){ updateMeasurementTable(); updateCalibrationList(); + if(caltype.type != Type::None) { + // update the calibration with the new measurement + if(canCompute(caltype)) { + compute(caltype); + } else { + // can not keep the calibration, disabled + deactivate(); + } + } }); connect(ui->clearMeasurement, &QPushButton::clicked, [=](){