Skip to content

Commit

Permalink
Arch: use new name of the icon Part_3D_object
Browse files Browse the repository at this point in the history
It is defined in the Part Workbench. Before, it was called `Tree_Part`.
  • Loading branch information
vocx-fc authored and wwmayer committed Oct 22, 2020
1 parent 15408b2 commit 587475f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
5 changes: 3 additions & 2 deletions src/Mod/Arch/ArchAxis.py
Expand Up @@ -1001,8 +1001,9 @@ def getIcon(self,obj):
return QtGui.QIcon(":/icons/Sketcher_Sketch.svg")
elif obj.isDerivedFrom("App::DocumentObjectGroup"):
return QtGui.QApplication.style().standardIcon(QtGui.QStyle.SP_DirIcon)
else:
return QtGui.QIcon(":/icons/Tree_Part.svg")
elif hasattr(obj.ViewObject, "Icon"):
return QtGui.QIcon(obj.ViewObject.Icon)
return QtGui.QIcon(":/icons/Part_3D_object.svg")

def update(self):

Expand Down
8 changes: 5 additions & 3 deletions src/Mod/Arch/ArchComponent.py
Expand Up @@ -1805,11 +1805,13 @@ def getIcon(self,obj):
if hasattr(obj.ViewObject,"Proxy"):
if hasattr(obj.ViewObject.Proxy,"getIcon"):
return QtGui.QIcon(obj.ViewObject.Proxy.getIcon())
if obj.isDerivedFrom("Sketcher::SketchObject"):
elif obj.isDerivedFrom("Sketcher::SketchObject"):
return QtGui.QIcon(":/icons/Sketcher_Sketch.svg")
if obj.isDerivedFrom("App::DocumentObjectGroup"):
elif obj.isDerivedFrom("App::DocumentObjectGroup"):
return QtGui.QApplication.style().standardIcon(QtGui.QStyle.SP_DirIcon)
return QtGui.QIcon(":/icons/Tree_Part.svg")
elif hasattr(obj.ViewObject, "Icon"):
return QtGui.QIcon(obj.ViewObject.Icon)
return QtGui.QIcon(":/icons/Part_3D_object.svg")

def update(self):
"""Populate the treewidget with its various items.
Expand Down
4 changes: 3 additions & 1 deletion src/Mod/Arch/ArchPanel.py
Expand Up @@ -1611,8 +1611,10 @@ def addObject(self,obj,form):
if hasattr(obj.ViewObject,"Proxy"):
if hasattr(obj.ViewObject.Proxy,"getIcon"):
i.setIcon(QtGui.QIcon(obj.ViewObject.Proxy.getIcon()))
elif hasattr(obj.ViewObject, "Icon"):
i.setIcon(QtGui.QIcon(obj.ViewObject.Icon))
else:
i.setIcon(QtGui.QIcon(":/icons/Tree_Part.svg"))
i.setIcon(QtGui.QIcon(":/icons/Part_3D_object.svg"))
form.addItem(i)

def removeShapes(self):
Expand Down
5 changes: 3 additions & 2 deletions src/Mod/Arch/ArchSectionPlane.py
Expand Up @@ -1384,8 +1384,9 @@ def getIcon(self,obj):
return QtGui.QIcon(":/icons/Sketcher_Sketch.svg")
elif obj.isDerivedFrom("App::DocumentObjectGroup"):
return QtGui.QApplication.style().standardIcon(QtGui.QStyle.SP_DirIcon)
else:
return QtGui.QIcon(":/icons/Tree_Part.svg")
elif hasattr(obj.ViewObject, "Icon"):
return QtGui.QIcon(obj.ViewObject.Icon)
return QtGui.QIcon(":/icons/Part_3D_object.svg")

def update(self):
'fills the treewidget'
Expand Down
8 changes: 5 additions & 3 deletions src/Mod/Arch/ArchWindow.py
Expand Up @@ -1327,9 +1327,11 @@ def getIcon(self,obj):
if hasattr(obj.ViewObject,"Proxy"):
if hasattr(obj.ViewObject.Proxy,"getIcon"):
return QtGui.QIcon(obj.ViewObject.Proxy.getIcon())
if obj.isDerivedFrom("Sketcher::SketchObject"):
elif obj.isDerivedFrom("Sketcher::SketchObject"):
return QtGui.QIcon(":/icons/Sketcher_Sketch.svg")
return QtGui.QIcon(":/icons/Tree_Part.svg")
elif hasattr(obj.ViewObject, "Icon"):
return QtGui.QIcon(obj.ViewObject.Icon)
return QtGui.QIcon(":/icons/Part_3D_object.svg")

def update(self):

Expand All @@ -1355,7 +1357,7 @@ def update(self):
for p in range(0,len(self.obj.WindowParts),5):
item = QtGui.QTreeWidgetItem(self.comptree)
item.setText(0,self.obj.WindowParts[p])
item.setIcon(0,QtGui.QIcon(":/icons/Tree_Part.svg"))
item.setIcon(0, QtGui.QIcon(":/icons/Part_3D_object.svg"))
if hasattr(self.obj,"HoleWire"):
self.holeNumber.setText(str(self.obj.HoleWire))
else:
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Arch/importIFClegacy.py
Expand Up @@ -1837,7 +1837,7 @@ def explorer(filename,schema="IFC2X3_TC1.exp"):
elif e.type in ["IFCROOF"]:
item.setIcon(1,QtGui.QIcon(":icons/Arch_Roof_Tree.svg"))
elif e.type in ["IFCEXTRUDEDAREASOLID","IFCCLOSEDSHELL"]:
item.setIcon(1,QtGui.QIcon(":icons/Tree_Part.svg"))
item.setIcon(1, QtGui.QIcon(":/icons/Part_3D_object.svg"))
elif e.type in ["IFCFACE"]:
item.setIcon(1,QtGui.QIcon(":icons/Draft_SwitchMode.svg"))
elif e.type in ["IFCARBITRARYCLOSEDPROFILEDEF","IFCPOLYLOOP"]:
Expand Down

0 comments on commit 587475f

Please sign in to comment.