disable cmin, cmax spinbpx if counter not checked
Build on RHEL9 docker image / build (push) Successful in 3m58s
Build on RHEL8 docker image / build (push) Successful in 5m8s
Run Simulator Tests on local RHEL9 / build (push) Successful in 20m39s
Run Simulator Tests on local RHEL8 / build (push) Successful in 24m8s

This commit is contained in:
mazzol_a committed 2026-10-15 12:13:22 +02:00
1 parent 0f7e5f30ba
commit 01f6548b23
1 file changed
+6 -3
+6 -3
View File
@@ -147,11 +147,14 @@ class PlotTab(QtWidgets.QWidget):
def displayCounter(self, index : int, state : int):
# toggle the display of the counter i and update the splitter
self.setCounterCheckBox(index, state == QtCore.Qt.Checked)
self.transceiverTab.shownCounters[index] = (state == QtCore.Qt.Checked)
self.transceiverTab.update_ImageSplitter()
def setCounterCheckBox(self, index : int, check : bool):
self.checkBoxCounters[index].setChecked(check)
self.cmaxSpinBoxes[index].setEnabled(check and self.colorRangeMode == Defines.colorRange.fixed)
self.cminSpinBoxes[index].setEnabled(check and self.colorRangeMode == Defines.colorRange.fixed)
def enableCounterCheckBox(self, index : int, enabled : bool):
is_transceiver = self.mainWindow.romode.value in [3, 4]
@@ -281,9 +284,9 @@ class PlotTab(QtWidgets.QWidget):
# disable or enable cmin/cmax spinboxes
enableSpinBoxes = mode == Defines.colorRange.fixed
for cminSpinBox, cmaxSpinBox in zip(self.cminSpinBoxes, self.cmaxSpinBoxes):
cminSpinBox.setEnabled(enableSpinBoxes)
cmaxSpinBox.setEnabled(enableSpinBoxes)
for cminSpinBox, cmaxSpinBox, checkBox in zip(self.cminSpinBoxes, self.cmaxSpinBoxes, self.checkBoxCounters):
cminSpinBox.setEnabled(enableSpinBoxes and checkBox.isChecked())
cmaxSpinBox.setEnabled(enableSpinBoxes and checkBox.isChecked())
for index in range(Defines.max_counters): # TODO does it work with other detectors?
self.updateColorRange(index=index)