This commit is contained in:
2019-07-02 17:11:03 +02:00
parent 455252f2f3
commit 864db79a13
12 changed files with 38 additions and 44 deletions

View File

@ -205,19 +205,20 @@ void qTabSettings::SetDynamicRange(int index) {
void qTabSettings::GetThresholdEnergy() {
FILE_LOG(logDEBUG) << "Getting theshold energy";
disconnect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetThresholdEnergy()));
disconnect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetThresholdEnergy(int)));
try {
auto retval = myDet->getThresholdEnergy();
if (retval == -1) {
/*if (retval == -1) { commenting out as default is -1, handle this when API changes
qDefs::Message(qDefs::WARNING, "Threshold Energy is inconsistent for all detectors.", "qTabDataOutput::GetThresholdEnergy");
spinThreshold->setValue(-1);
} else {
spinThreshold->setValue(retval);
}
}*/
spinThreshold->setValue(retval);
} CATCH_DISPLAY ("Could not get threshold energy.", "qTabDataOutput::GetThresholdEnergy")
connect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetThresholdEnergy()));
connect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetThresholdEnergy(int)));
}
void qTabSettings::SetThresholdEnergy(int index) {