diff --git a/Stirrup.py b/Stirrup.py index 3a686ea..8a5331a 100644 --- a/Stirrup.py +++ b/Stirrup.py @@ -620,12 +620,12 @@ def editStirrup( def editDialog(vobj): FreeCADGui.Control.closeDialog() obj = _StirrupTaskPanel(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.t_sideCover.setText(str(vobj.Object.TopCover)) - obj.form.b_sideCover.setText(str(vobj.Object.BottomCover)) - obj.form.diameter.setText(str(vobj.Object.Diameter)) + 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.t_sideCover.setText(FreeCAD.Units.Quantity(vobj.Object.TopCover, FreeCAD.Units.Length).UserString) + obj.form.b_sideCover.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.bentAngle.setCurrentIndex( obj.form.bentAngle.findText(str(vobj.Object.BentAngle)) ) @@ -638,7 +638,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)