remember old read freq if not 0 in gui

This commit is contained in:
Dhanya Maliakal 2017-12-05 16:03:49 +01:00
parent 7aaf95a565
commit b498043ea6

View File

@ -773,6 +773,8 @@ void qTabPlot::EnableScanBox(){
disconnect(btnGroupPlotType,SIGNAL(buttonClicked(int)),this, SLOT(SetPlot()));
disconnect(boxScan, SIGNAL(toggled(bool)), this, SLOT(EnableScanBox()));
int oldfreqvalue = myDet->setReadReceiverFrequency();
int mode0 = myDet->getScanMode(0);
int mode1 = myDet->getScanMode(1);
@ -943,6 +945,18 @@ void qTabPlot::EnableScanBox(){
pageHistogram_2->setEnabled(false);
}
// if it was set to read every frame
if (oldfreqvalue != 0 && (comboFrequency->currentIndex() != 1 || spinNthFrame->value() != oldfreqvalue)) {
disconnect(spinNthFrame, SIGNAL(editingFinished()), this, SLOT(SetFrequency()));
disconnect(comboFrequency, SIGNAL(currentIndexChanged(int)), this, SLOT(SetFrequency()));
comboFrequency->setCurrentIndex(1);
spinNthFrame->setValue(1);
SetFrequency();
connect(spinNthFrame, SIGNAL(editingFinished()), this, SLOT(SetFrequency()));
connect(comboFrequency, SIGNAL(currentIndexChanged(int)), this, SLOT(SetFrequency()));
}
connect(btnGroupPlotType,SIGNAL(buttonClicked(int)),this, SLOT(SetPlot()));
connect(boxScan, SIGNAL(toggled(bool)), this, SLOT(EnableScanBox()));