forked from M-Labs/artiq
1
0
Fork 0

dashboard: Disable Group CCB policy menu before first entry is selected

It was possible to crash the dashboard by opening the context menu
before an applet entry had been selected for the first time (e.g.
immediately after startup) and selecting one of the Group CCB
actions, as the enable update slot would not have been run.
This commit is contained in:
David Nadlinger 2021-03-21 02:04:24 +00:00 committed by Sebastien Bourdeauducq
parent 9a9290a72d
commit 3f6840b736
1 changed files with 1 additions and 0 deletions

View File

@ -45,6 +45,7 @@ class AppletsCCBDock(applets.AppletsDock):
self.ccbp_group_action.setMenu(ccbp_group_menu) self.ccbp_group_action.setMenu(ccbp_group_menu)
self.table.addAction(self.ccbp_group_action) self.table.addAction(self.ccbp_group_action)
self.table.itemSelectionChanged.connect(self.update_group_ccbp_menu) self.table.itemSelectionChanged.connect(self.update_group_ccbp_menu)
self.update_group_ccbp_menu()
ccbp_global_menu = QtWidgets.QMenu() ccbp_global_menu = QtWidgets.QMenu()
actiongroup = QtWidgets.QActionGroup(self.table) actiongroup = QtWidgets.QActionGroup(self.table)