From beb3610a2c599e6971ffc5c4040aae69f9f487c6 Mon Sep 17 00:00:00 2001 From: balrobs <73989799+balrobs@users.noreply.github.com> Date: Wed, 29 May 2024 19:48:47 +0200 Subject: [PATCH] Update MainReinforcementDrawingDimensioning.py solves comma decimal separator issue for "Reinforcement Drawing Dimensioning"-dialogs described in #214 --- .../MainReinforcementDrawingDimensioning.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReinforcementDrawing/MainReinforcementDrawingDimensioning.py b/ReinforcementDrawing/MainReinforcementDrawingDimensioning.py index 2bee422..1db4afe 100644 --- a/ReinforcementDrawing/MainReinforcementDrawingDimensioning.py +++ b/ReinforcementDrawing/MainReinforcementDrawingDimensioning.py @@ -309,7 +309,7 @@ def setDefaultShapesData(self): """This function is used to set default values in "Shapes - Rebars & Structure" stacked widget in UI.""" form = self.shapes_data_widget - form.rebars_stroke_width.setText(f"{self.rebars_stroke_width} mm") + form.rebars_stroke_width.setText(FreeCAD.Units.Quantity(self.rebars_stroke_width, FreeCAD.Units.Length).UserString) if self.rebars_color_style == "Automatic": form.rebars_shape_color_radio.setChecked(True) form.rebars_custom_color_radio.setChecked(False) @@ -323,7 +323,7 @@ def setDefaultShapesData(self): self.rebars_color[0], self.rebars_color[1], self.rebars_color[2] ) form.rebars_color.setProperty("color", color) - form.structure_stroke_width.setText(f"{self.structure_stroke_width} mm") + form.structure_stroke_width.setText(FreeCAD.Units.Quantity(self.structure_stroke_width, FreeCAD.Units.Length).UserString) if self.structure_color_style == "Automatic": form.structure_shape_color_radio.setChecked(True) form.structure_color_none.setChecked(False) @@ -397,7 +397,7 @@ def setDefaultDimensionLabelsLinesData(self): self.dimension_text_color[2], ) form.dimension_text_color.setProperty("color", color) - form.dimension_stroke_width.setText(f"{self.dimension_stroke_width} mm") + form.dimension_stroke_width.setText(FreeCAD.Units.Quantity(self.dimension_stroke_width, FreeCAD.Units.Length).UserString) if form.dimension_line_style.findText(self.dimension_line_style) == -1: form.dimension_line_style.setCurrentIndex(0) else: