From a7f35650649cbba9d3f2dacdb308f0b513c577e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Fri, 14 Oct 2022 17:55:46 +0200 Subject: [PATCH] Improve autonaming of calibration --- .../LibreVNA-GUI/Calibration/calibration.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Software/PC_Application/LibreVNA-GUI/Calibration/calibration.cpp b/Software/PC_Application/LibreVNA-GUI/Calibration/calibration.cpp index dcdf9c4..484b62b 100644 --- a/Software/PC_Application/LibreVNA-GUI/Calibration/calibration.cpp +++ b/Software/PC_Application/LibreVNA-GUI/Calibration/calibration.cpp @@ -1224,11 +1224,16 @@ QString Calibration::descriptiveCalName() } QString tmp = - caltype.getReadableDescription() - + " " + caltype.getShortString() + + "_" + lo + "-" + hi - + " " + + "_" + QString::number(this->points.size()) + "pt"; + tmp = tmp.replace(" ", "_"); + tmp = tmp.replace("[", ""); + tmp = tmp.replace("]", ""); + tmp = tmp.replace(".", "_"); + tmp = tmp.replace(",", "_"); return tmp; } @@ -1313,9 +1318,6 @@ bool Calibration::toFile(QString filename) file.open(calibration_file.toStdString()); file << setw(1) << toJSON(); - auto calkit_file = filename + ".calkit"; - qDebug() << "Saving associated calibration kit to file" << calkit_file; - kit.toFile(calkit_file); this->currentCalFile = calibration_file; // if all ok, remember this unsavedChanges = false;