From a1f2f31d3597964b1d06eb33c801d62092e8ec41 Mon Sep 17 00:00:00 2001 From: Konstantin Leontev Date: Mon, 17 Jun 2024 10:34:20 +0100 Subject: [PATCH] [bos #38044][EDF] (2023-T3) Support for automatic reparation. Fixed an accident changing of QDoubleSpinBox default value because of setting decimals. --- src/RepairGUIAdv/geomrepairadv_common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/RepairGUIAdv/geomrepairadv_common.py b/src/RepairGUIAdv/geomrepairadv_common.py index 83c93379d..7ecc59c41 100644 --- a/src/RepairGUIAdv/geomrepairadv_common.py +++ b/src/RepairGUIAdv/geomrepairadv_common.py @@ -60,6 +60,8 @@ class DlgRef_1Spin_QTD(Ui_DlgRef_1Spin_QTD, QWidget): self.setupUi(self) self.TextLabel1.setText(title) - self.SpinBox_DX.setValue(default_value) + # Setting deciamals must be in the first place, because from QDoubleSpinBox docs: + # the maximum, minimum and value might change as a result of changing this property. self.SpinBox_DX.setDecimals(decimals) self.SpinBox_DX.setMaximum(max_value) + self.SpinBox_DX.setValue(default_value) -- 2.39.2