diff --git a/gui/control_main.py b/gui/control_main.py index c08dab53..96a03715 100644 --- a/gui/control_main.py +++ b/gui/control_main.py @@ -597,6 +597,7 @@ def createSampleTab(self): self.resolution_ledit.textEdited[str].connect(self.resoTextChanged) if daq_utils.beamline == "nyx": self.resolution_ledit.setEnabled(False) + #self.resolution_ledit.setReadOnly(True) detDistLabel = QtWidgets.QLabel("Detector Dist.") #detDistLabel.setAlignment(QtCore.Qt.AlignCenter) detDistRBLabel = QtWidgets.QLabel("Readback:") @@ -2570,15 +2571,17 @@ def detDistTextChanged(self, text): try: reso_s = "%.2f" % ( daq_utils.calc_reso( - daq_utils.det_radius, + float(daq_utils.det_radius), float(text), daq_utils.energy2wave(float(self.energy_ledit.text())), 0, ) ) - except ValueError: + except ValueError as e: + logger.warning(e) reso_s = "50.0" - except TypeError: + except TypeError as t: + logger.warning(t) reso_s = "50.0" self.setGuiValues({"resolution": reso_s})