Fixed buggy Building-US units schema

This commit is contained in:
Yorik van Havre
2016-05-29 12:15:35 -03:00
parent fca5cd99bb
commit d6f31d5c4b
2 changed files with 3 additions and 2 deletions

View File

@@ -3589,7 +3589,8 @@ class _ViewProviderDimension(_ViewProviderDraft):
l = self.p3.sub(self.p2).Length
# special representation if "Building US" scheme
if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("UserSchema",0) == 5:
self.string = FreeCAD.Units.Quantity(l,FreeCAD.Units.Length).UserString
s = FreeCAD.Units.Quantity(l,FreeCAD.Units.Length).UserString
self.string = s.replace("' ","'- ")
elif hasattr(obj.ViewObject,"Decimals"):
self.string = DraftGui.displayExternal(l,obj.ViewObject.Decimals,'Length',su)
else: