Arch: fixed error when opening 0.14 files

This commit is contained in:
Yorik van Havre
2019-04-29 12:41:01 -03:00
parent df57424c84
commit d5432fcf2a

View File

@@ -1372,7 +1372,7 @@ class _ViewProviderWindow(ArchComponent.ViewProviderComponent):
obj.ViewObject.update()
self.colorize(obj)
elif prop == "CloneOf":
if obj.CloneOf:
if hasattr(obj,"CloneOf") and obj.CloneOf:
mat = None
if hasattr(obj,"Material"):
if obj.Material:
@@ -1423,7 +1423,7 @@ class _ViewProviderWindow(ArchComponent.ViewProviderComponent):
def colorize(self,obj,force=False):
"setting different part colors"
if obj.CloneOf:
if hasattr(obj,"CloneOf") and obj.CloneOf:
if self.areDifferentColors(obj.ViewObject.DiffuseColor,obj.CloneOf.ViewObject.DiffuseColor) or force:
obj.ViewObject.DiffuseColor = obj.CloneOf.ViewObject.DiffuseColor
return