Change icon cache name

This commit is contained in:
Zheng, Lei 2018-08-28 07:48:46 +08:00
parent 821d7194fc
commit ed14946534

View File

@ -42,15 +42,14 @@ def getIcon(obj,disabled=False,path=None):
return obj._iconDisabled return obj._iconDisabled
def addIconToFCAD(iconFile,path=None): def addIconToFCAD(iconFile,path=None):
iconName = ':asm3/icons/' + iconFile
if not path: if not path:
path = iconPath path = iconPath
try: try:
path = os.path.join(path,iconFile) path = os.path.join(path,iconFile)
FreeCADGui.addIcon(iconName,path) FreeCADGui.addIcon(path,path)
except AssertionError: except AssertionError:
pass pass
return iconName return path
def objName(obj): def objName(obj):
try: try: