Merge pull request #6820 from 0penBrain/startPage

[Bugfix] Prevent start page loading to fail if WB doesn't define an icon
This commit is contained in:
Yorik van Havre
2022-05-03 10:18:17 +02:00
committed by GitHub

View File

@@ -483,7 +483,7 @@ def handle():
img = os.path.join(FreeCAD.getResourceDir(),"Mod",wn,"Resources","icons",wn+"Workbench.svg")
if not os.path.exists(img):
w = FreeCADGui.listWorkbenches()[wb]
if hasattr(w,"Icon"):
if hasattr(w,"Icon") and w.Icon:
xpm = w.Icon
if "XPM" in xpm:
xpm = xpm.replace("\n ","\n") # some XPMs have some indent that QT doesn't like