Arch: Fixed small bug in Space

This commit is contained in:
Yorik van Havre
2017-06-11 22:37:31 -03:00
parent fb62c91366
commit e24aa3fb23

View File

@@ -420,7 +420,7 @@ class _ViewProviderSpace(ArchComponent.ViewProviderComponent):
vobj.LineColor = (1.0,0.0,0.0,1.0)
vobj.DrawStyle = "Dotted"
vobj.addProperty("App::PropertyStringList", "Text", "Arch",QT_TRANSLATE_NOOP("App::Property","The text to show. Use $area, $label, $tag, $floor, $walls, $ceiling to insert the respective data"))
vobj.addProperty("App::PropertyFont", "FontName", "Arch",QT_TRANSLATE_NOOP("App::Property","The name of the font"))
vobj.addProperty("App::PropertyFont", "FontName", "Arch",QT_TRANSLATE_NOOP("App::Property","The name of the font"))
vobj.addProperty("App::PropertyColor", "TextColor", "Arch",QT_TRANSLATE_NOOP("App::Property","The color of the area text"))
vobj.addProperty("App::PropertyLength", "FontSize", "Arch",QT_TRANSLATE_NOOP("App::Property","The size of the text font"))
vobj.addProperty("App::PropertyLength", "FirstLine", "Arch",QT_TRANSLATE_NOOP("App::Property","The size of the first line of text"))
@@ -508,8 +508,8 @@ class _ViewProviderSpace(ArchComponent.ViewProviderComponent):
if t:
if hasattr(vobj.Object,"Area"):
from FreeCAD import Units
q = Units.Quantity(vobj.Object.Area,Units.Area).getUserPreferred()
qt = vobj.Object.Area/q[1]
q = Units.Quantity(vobj.Object.Area.Value,Units.Area).getUserPreferred()
qt = vobj.Object.Area.Value/q[1]
if hasattr(vobj,"Decimals"):
if vobj.Decimals == 0:
qt = str(int(qt))