Fixed buggy Building-US units schema
This commit is contained in:
parent
fca5cd99bb
commit
d6f31d5c4b
|
@ -211,7 +211,7 @@ QString UnitsSchemaImperialBuilding::schemaTranslate(Base::Quantity quant,double
|
||||||
if (feet > 0) {
|
if (feet > 0) {
|
||||||
output << feet << "'";
|
output << feet << "'";
|
||||||
if ( (inches > 0) || (fraction > 0.0625) )
|
if ( (inches > 0) || (fraction > 0.0625) )
|
||||||
output << " - ";
|
output << " ";
|
||||||
}
|
}
|
||||||
// inches
|
// inches
|
||||||
if (inches > 0) {
|
if (inches > 0) {
|
||||||
|
|
|
@ -3589,7 +3589,8 @@ class _ViewProviderDimension(_ViewProviderDraft):
|
||||||
l = self.p3.sub(self.p2).Length
|
l = self.p3.sub(self.p2).Length
|
||||||
# special representation if "Building US" scheme
|
# special representation if "Building US" scheme
|
||||||
if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("UserSchema",0) == 5:
|
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"):
|
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