From c65d9cfc6b9d4361f939316202cf7578cf7d0604 Mon Sep 17 00:00:00 2001 From: Patrick Avery Date: Fri, 13 Dec 2024 15:18:25 -0600 Subject: [PATCH] Fix manually setting relative constraint Signed-off-by: Patrick Avery --- hexrdgui/calibration/calibration_dialog.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hexrdgui/calibration/calibration_dialog.py b/hexrdgui/calibration/calibration_dialog.py index 98385c194..61c1a7d8c 100644 --- a/hexrdgui/calibration/calibration_dialog.py +++ b/hexrdgui/calibration/calibration_dialog.py @@ -372,11 +372,7 @@ def relative_constraints(self) -> RelativeConstraintsType: def relative_constraints(self, v: RelativeConstraintsType): v = v if v is not None else RelativeConstraintsType.none w = self.ui.relative_constraints - options = [w.itemText(i) for i in range(w.count())] - if v.value not in options: - raise Exception(f'Invalid relative constraints: {v.value}') - - w.setCurrentText(v.value) + w.setCurrentText(RELATIVE_CONSTRAINT_LABELS[v]) self.update_relative_constraint_visibilities()