Merge pull request #53 from wood-galaxy/equipement-fix
Arch : Fix ViewProviderComponent if vobj have not DiffuseColor attribute
This commit is contained in:
commit
6a93d1392d
|
@ -709,9 +709,10 @@ class ViewProviderComponent:
|
|||
vobj.update()
|
||||
elif prop == "ShapeColor":
|
||||
# restore DiffuseColor after overridden by ShapeColor
|
||||
if len(vobj.DiffuseColor) > 1:
|
||||
d = vobj.DiffuseColor
|
||||
vobj.DiffuseColor = d
|
||||
if hasattr(vobj,"DiffuseColor"):
|
||||
if len(vobj.DiffuseColor) > 1:
|
||||
d = vobj.DiffuseColor
|
||||
vobj.DiffuseColor = d
|
||||
return
|
||||
|
||||
def attach(self,vobj):
|
||||
|
|
|
@ -235,9 +235,9 @@ class _Equipment(ArchComponent.Component):
|
|||
"The Equipment object"
|
||||
def __init__(self,obj):
|
||||
ArchComponent.Component.__init__(self,obj)
|
||||
obj.addProperty("Part::PropertyPartShape","TopView","Arch",translate("Arch","an optional 2D shape representing a top view of this equipment"))
|
||||
obj.addProperty("Part::PropertyPartShape","FrontView","Arch",translate("Arch","an optional 2D shape representing a front view of this equipment"))
|
||||
obj.addProperty("Part::PropertyPartShape","SideView","Arch",translate("Arch","an optional 2D shape representing a side view of this equipment"))
|
||||
#obj.addProperty("Part::PropertyPartShape","TopView","Arch",translate("Arch","an optional 2D shape representing a top view of this equipment"))
|
||||
#obj.addProperty("Part::PropertyPartShape","FrontView","Arch",translate("Arch","an optional 2D shape representing a front view of this equipment"))
|
||||
#obj.addProperty("Part::PropertyPartShape","SideView","Arch",translate("Arch","an optional 2D shape representing a side view of this equipment"))
|
||||
obj.addProperty("App::PropertyString","Model","Arch",translate("Arch","The model description of this equipment"))
|
||||
obj.addProperty("App::PropertyString","Url","Arch",translate("Arch","The url of the product page of this equipment"))
|
||||
self.Type = "Equipment"
|
||||
|
|
Loading…
Reference in New Issue
Block a user