Browse Source

don't fail when icons are not ready yet

master
Nils 6 months ago
parent
commit
1a579b336f
  1. 8
      qtgui/opensessioncontroller.py

8
qtgui/opensessioncontroller.py

@ -115,7 +115,10 @@ class ClientItem(QtWidgets.QTreeWidgetItem):
def updateIcon(self, clientDict:dict):
"""Just called during init"""
programIcons = self.parentController.mainWindow.programIcons
assert programIcons
if not programIcons:
return #later again.
assert "executable" in clientDict, clientDict
iconColumn = self.parentController.clientsTreeWidgetColumns.index("reportedName")
if clientDict["executable"] in programIcons:
@ -422,7 +425,8 @@ class LauncherProgram(QtWidgets.QTreeWidgetItem):
self.setText(index, t)
programIcons = self.parentController.mainWindow.programIcons
assert programIcons
if not programIcons:
return #later again
if launcherDict["agordejoExec"] in programIcons:
icon = programIcons[launcherDict["agordejoExec"]]
self.setIcon(self.parentController.columns.index("agordejoName"), icon) #name is correct here. this is just the column.

Loading…
Cancel
Save