Arch: Fixed bug in component icon

This commit is contained in:
Yorik van Havre
2018-02-09 10:37:01 +01:00
parent ec04b0e9fc
commit 00ddc9b8da

View File

@@ -215,13 +215,13 @@ class ComponentTaskPanel:
def getIcon(self,obj):
if hasattr(obj.ViewObject,"Proxy"):
return QtGui.QIcon(obj.ViewObject.Proxy.getIcon())
elif obj.isDerivedFrom("Sketcher::SketchObject"):
if hasattr(obj.ViewObject.Proxy,"getIcon"):
return QtGui.QIcon(obj.ViewObject.Proxy.getIcon())
if obj.isDerivedFrom("Sketcher::SketchObject"):
return QtGui.QIcon(":/icons/Sketcher_Sketch.svg")
elif obj.isDerivedFrom("App::DocumentObjectGroup"):
if obj.isDerivedFrom("App::DocumentObjectGroup"):
return QtGui.QApplication.style().standardIcon(QtGui.QStyle.SP_DirIcon)
else:
return QtGui.QIcon(":/icons/Tree_Part.svg")
return QtGui.QIcon(":/icons/Tree_Part.svg")
def update(self):
'fills the treewidget'