diff --git a/LShapeRebar.py b/LShapeRebar.py index a8b65e9..742eb55 100644 --- a/LShapeRebar.py +++ b/LShapeRebar.py @@ -586,12 +586,12 @@ def editLShapeRebar( def editDialog(vobj): FreeCADGui.Control.closeDialog() obj = _LShapeRebarTaskPanel(vobj.Object) - obj.form.frontCover.setText(str(vobj.Object.FrontCover)) - obj.form.l_sideCover.setText(str(vobj.Object.LeftCover)) - obj.form.r_sideCover.setText(str(vobj.Object.RightCover)) - obj.form.bottomCover.setText(str(vobj.Object.BottomCover)) - obj.form.diameter.setText(str(vobj.Object.Diameter)) - obj.form.topCover.setText(str(vobj.Object.TopCover)) + obj.form.frontCover.setText(FreeCAD.Units.Quantity(vobj.Object.FrontCover, FreeCAD.Units.Length).UserString) + obj.form.l_sideCover.setText(FreeCAD.Units.Quantity(vobj.Object.LeftCover, FreeCAD.Units.Length).UserString) + obj.form.r_sideCover.setText(FreeCAD.Units.Quantity(vobj.Object.RightCover, FreeCAD.Units.Length).UserString) + obj.form.bottomCover.setText(FreeCAD.Units.Quantity(vobj.Object.BottomCover, FreeCAD.Units.Length).UserString) + obj.form.diameter.setText(FreeCAD.Units.Quantity(vobj.Object.Diameter, FreeCAD.Units.Length).UserString) + obj.form.topCover.setText(FreeCAD.Units.Quantity(vobj.Object.TopCover, FreeCAD.Units.Length).UserString) obj.form.rounding.setValue(vobj.Object.Rounding) obj.form.orientationValue.setCurrentIndex( obj.form.orientationValue.findText(str(vobj.Object.Orientation)) @@ -603,7 +603,7 @@ def editDialog(vobj): obj.form.spacing_radio.setChecked(True) obj.form.amount.setDisabled(True) obj.form.spacing.setEnabled(True) - obj.form.spacing.setText(str(vobj.Object.TrueSpacing)) + obj.form.spacing.setText(FreeCAD.Units.Quantity(vobj.Object.TrueSpacing, FreeCAD.Units.Length).UserString) # obj.form.PickSelectedFace.setVisible(False) FreeCADGui.Control.showDialog(obj)