From 3f6840b736873f440cf8494d578ff0bf4f7367d7 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sun, 21 Mar 2021 02:04:24 +0000 Subject: [PATCH] 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. --- artiq/dashboard/applets_ccb.py | 1 + 1 file changed, 1 insertion(+) diff --git a/artiq/dashboard/applets_ccb.py b/artiq/dashboard/applets_ccb.py index 73e2f23fb..78c7ab673 100644 --- a/artiq/dashboard/applets_ccb.py +++ b/artiq/dashboard/applets_ccb.py @@ -45,6 +45,7 @@ class AppletsCCBDock(applets.AppletsDock): self.ccbp_group_action.setMenu(ccbp_group_menu) self.table.addAction(self.ccbp_group_action) self.table.itemSelectionChanged.connect(self.update_group_ccbp_menu) + self.update_group_ccbp_menu() ccbp_global_menu = QtWidgets.QMenu() actiongroup = QtWidgets.QActionGroup(self.table)