From 60c668231e79a41795793ff3adf96486ea333f2b Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sun, 2 Dec 2018 19:10:46 -0200 Subject: [PATCH] Arch: Fixed buggy display string of BuildingParts --- src/Mod/Arch/ArchBuildingPart.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Mod/Arch/ArchBuildingPart.py b/src/Mod/Arch/ArchBuildingPart.py index 112dbcb3d3..fe0e595885 100644 --- a/src/Mod/Arch/ArchBuildingPart.py +++ b/src/Mod/Arch/ArchBuildingPart.py @@ -555,6 +555,8 @@ class ViewProviderBuildingPart: if len(colors) == len(obj.Shape.Faces): if colors != obj.ViewObject.DiffuseColor: obj.ViewObject.DiffuseColor = colors + elif prop == "Label": + self.onChanged(obj.ViewObject,"ShowLabel") def getColors(self,obj): @@ -621,8 +623,8 @@ class ViewProviderBuildingPart: else: if rn.findChild(self.sep) != -1: rn.removeChild(self.sep) - elif prop in ["OverrideUnit","ShowUnit"]: - if hasattr(vobj,"OverrideUnit") and hasattr(vobj,"ShowUnit"): + if prop in ["OverrideUnit","ShowUnit","ShowLevel","ShowLabel"]: + if hasattr(vobj,"OverrideUnit") and hasattr(vobj,"ShowUnit") and hasattr(vobj,"ShowLevel") and hasattr(vobj,"ShowLabel"): z = vobj.Object.Placement.Base.z + vobj.Object.LevelOffset.Value q = FreeCAD.Units.Quantity(z,FreeCAD.Units.Length) txt = "" @@ -632,7 +634,7 @@ class ViewProviderBuildingPart: if txt: txt += " " if z >= 0: - txt = "+" + txt += "+" if vobj.OverrideUnit: u = vobj.OverrideUnit else: