From 4e41ee519279c94ff6baa6be16f99dd4a1fe80cc Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Fri, 6 Oct 2017 16:18:25 +0000 Subject: [PATCH] Rename the fmt.all calibration measurements file after accepting a solution This allows those who want to keep their calibration measurements after finding a solution to calibrate their station. The fmt.all file used to find and accept a solution is renamed to fmt.bak. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8164 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index a1cb004ea..486af6241 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2134,9 +2134,11 @@ void MainWindow::on_actionSolve_FreqCal_triggered() , QString {} , MessageBox::Cancel | MessageBox::Apply)) { m_config.adjust_calibration_parameters (a, b); - // discard fmt.all as we have consumed the resulting calibration solution - QFile f {m_config.writeable_data_dir ().absoluteFilePath ("fmt.all")}; - f.remove (); + // rename fmt.all as we have consumed the resulting calibration + // solution + auto const& backup_file_name = m_config.writeable_data_dir ().absoluteFilePath ("fmt.bak"); + QFile::remove (backup_file_name); + QFile::rename (m_config.writeable_data_dir ().absoluteFilePath ("fmt.all"), backup_file_name); } }