Skip to content

Commit

Permalink
Fixed buggy Building-US units schema
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed May 29, 2016
1 parent fca5cd9 commit d6f31d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Base/UnitsSchemaImperial1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ QString UnitsSchemaImperialBuilding::schemaTranslate(Base::Quantity quant,double
if (feet > 0) {
output << feet << "'";
if ( (inches > 0) || (fraction > 0.0625) )
output << " - ";
output << " ";
}
// inches
if (inches > 0) {
Expand Down
3 changes: 2 additions & 1 deletion src/Mod/Draft/Draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -3589,7 +3589,8 @@ def updateData(self, obj, prop):
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:
Expand Down

0 comments on commit d6f31d5

Please sign in to comment.