Temporary workaround for the fractions issue in new imperial unit schema (using + between inches and fractions)

This commit is contained in:
Yorik van Havre 2016-07-09 14:01:07 -03:00
parent 79ddfd1bcf
commit 223725ca82
2 changed files with 2 additions and 1 deletions

View File

@ -219,7 +219,7 @@ QString UnitsSchemaImperialBuilding::schemaTranslate(Base::Quantity quant,double
if (inches > 0) {
output << inches;
if (fraction > 0.0625)
output << " ";
output << "+";
else
output << "\"";
}

View File

@ -3606,6 +3606,7 @@ class _ViewProviderDimension(_ViewProviderDraft):
if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("UserSchema",0) == 5:
s = FreeCAD.Units.Quantity(l,FreeCAD.Units.Length).UserString
self.string = s.replace("' ","'- ")
self.string = s.replace("+"," ")
elif hasattr(obj.ViewObject,"Decimals"):
self.string = DraftGui.displayExternal(l,obj.ViewObject.Decimals,'Length',su)
else: