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
This commit is contained in:
Bill Somerville 2017-10-06 16:18:25 +00:00
parent 592316fc42
commit 4e41ee5192

View File

@ -2134,9 +2134,11 @@ void MainWindow::on_actionSolve_FreqCal_triggered()
, QString {} , QString {}
, MessageBox::Cancel | MessageBox::Apply)) { , MessageBox::Cancel | MessageBox::Apply)) {
m_config.adjust_calibration_parameters (a, b); m_config.adjust_calibration_parameters (a, b);
// discard fmt.all as we have consumed the resulting calibration solution // rename fmt.all as we have consumed the resulting calibration
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("fmt.all")}; // solution
f.remove (); 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);
} }
} }