FEM: Python base VP, logs in get icon

This commit is contained in:
Bernd Hahnebach
2020-03-18 08:16:27 +01:00
parent 4bfa8ab455
commit 06a9a89eb2

View File

@@ -51,7 +51,7 @@ class ViewProxy(object):
# needs to be overwritten, if no standard icon name is used
# see constraint body heat source as an example
def getIcon(self):
print(self.Object.Name)
# print(self.Object.Name)
"""after load from FCStd file, self.icon does not exist, return constant path instead"""
# https://forum.freecadweb.org/viewtopic.php?f=18&t=44009
if (
@@ -61,6 +61,8 @@ class ViewProxy(object):
):
return ":/icons/{}.svg".format(self.Object.Proxy.Type.replace("Fem::", "FEM_"))
else:
FreeCAD.Console.PrintError("No icon returned for {}\n".format(self.Object.Name))
FreeCAD.Console.PrintMessage("{}\n".format(self.Object.Proxy.Type))
return ""
def attach(self, vobj):