Temporary workaround for the fractions issue in new imperial unit schema (using + between inches and fractions)
This commit is contained in:
parent
79ddfd1bcf
commit
223725ca82
|
@ -219,7 +219,7 @@ QString UnitsSchemaImperialBuilding::schemaTranslate(Base::Quantity quant,double
|
||||||
if (inches > 0) {
|
if (inches > 0) {
|
||||||
output << inches;
|
output << inches;
|
||||||
if (fraction > 0.0625)
|
if (fraction > 0.0625)
|
||||||
output << " ";
|
output << "+";
|
||||||
else
|
else
|
||||||
output << "\"";
|
output << "\"";
|
||||||
}
|
}
|
||||||
|
|
|
@ -3606,6 +3606,7 @@ class _ViewProviderDimension(_ViewProviderDraft):
|
||||||
if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("UserSchema",0) == 5:
|
if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("UserSchema",0) == 5:
|
||||||
s = FreeCAD.Units.Quantity(l,FreeCAD.Units.Length).UserString
|
s = FreeCAD.Units.Quantity(l,FreeCAD.Units.Length).UserString
|
||||||
self.string = s.replace("' ","'- ")
|
self.string = s.replace("' ","'- ")
|
||||||
|
self.string = s.replace("+"," ")
|
||||||
elif hasattr(obj.ViewObject,"Decimals"):
|
elif hasattr(obj.ViewObject,"Decimals"):
|
||||||
self.string = DraftGui.displayExternal(l,obj.ViewObject.Decimals,'Length',su)
|
self.string = DraftGui.displayExternal(l,obj.ViewObject.Decimals,'Length',su)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user