remove calEdited flag from VNA class
This commit is contained in:
parent
8dd747af62
commit
d2f1ca8f95
@ -62,7 +62,6 @@ VNA::VNA(AppWindow *window, QString name)
|
|||||||
calMeasuring = false;
|
calMeasuring = false;
|
||||||
calWaitFirst = false;
|
calWaitFirst = false;
|
||||||
calDialog.reset();
|
calDialog.reset();
|
||||||
calEdited = false;
|
|
||||||
changingSettings = false;
|
changingSettings = false;
|
||||||
settings.sweepType = SweepType::Frequency;
|
settings.sweepType = SweepType::Frequency;
|
||||||
settings.zerospan = false;
|
settings.zerospan = false;
|
||||||
@ -89,7 +88,6 @@ VNA::VNA(AppWindow *window, QString name)
|
|||||||
|
|
||||||
connect(saveCal, &QAction::triggered, [=](){
|
connect(saveCal, &QAction::triggered, [=](){
|
||||||
if(cal.toFile()) {
|
if(cal.toFile()) {
|
||||||
calEdited = false;
|
|
||||||
UpdateStatusbar();
|
UpdateStatusbar();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -672,7 +670,7 @@ void VNA::deviceDisconnected()
|
|||||||
|
|
||||||
void VNA::shutdown()
|
void VNA::shutdown()
|
||||||
{
|
{
|
||||||
if(calEdited && cal.getCaltype().type != Calibration::Type::None) {
|
if(cal.hasUnsavedChanges() && cal.getCaltype().type != Calibration::Type::None) {
|
||||||
auto save = InformationBox::AskQuestion("Save calibration?", "The calibration contains data that has not been saved yet. Do you want to save it before exiting?", false);
|
auto save = InformationBox::AskQuestion("Save calibration?", "The calibration contains data that has not been saved yet. Do you want to save it before exiting?", false);
|
||||||
if(save) {
|
if(save) {
|
||||||
cal.toFile();
|
cal.toFile();
|
||||||
@ -1223,7 +1221,6 @@ void VNA::StartCalibrationMeasurements(std::set<CalibrationMeasurement::Base*> m
|
|||||||
// enable calibration measurement only in transmission callback (prevents accidental sampling of data which was still being processed)
|
// enable calibration measurement only in transmission callback (prevents accidental sampling of data which was still being processed)
|
||||||
calMeasuring = true;
|
calMeasuring = true;
|
||||||
});
|
});
|
||||||
calEdited = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VNA::SetupSCPI()
|
void VNA::SetupSCPI()
|
||||||
@ -1647,5 +1644,4 @@ void VNA::SetSingleSweep(bool single)
|
|||||||
bool VNA::LoadCalibration(QString filename)
|
bool VNA::LoadCalibration(QString filename)
|
||||||
{
|
{
|
||||||
cal.fromFile(filename);
|
cal.fromFile(filename);
|
||||||
calEdited = false;
|
|
||||||
}
|
}
|
||||||
|
@ -140,8 +140,6 @@ private:
|
|||||||
// Calibration
|
// Calibration
|
||||||
Calibration cal;
|
Calibration cal;
|
||||||
bool changingSettings;
|
bool changingSettings;
|
||||||
// bool calValid;
|
|
||||||
bool calEdited;
|
|
||||||
std::set<CalibrationMeasurement::Base*> calMeasurements;
|
std::set<CalibrationMeasurement::Base*> calMeasurements;
|
||||||
bool calMeasuring;
|
bool calMeasuring;
|
||||||
bool calWaitFirst;
|
bool calWaitFirst;
|
||||||
|
Loading…
Reference in New Issue
Block a user