From 7466a4d9a913c0f1583d86f87cfd247397f4e210 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 7 May 2016 11:47:17 +0800 Subject: [PATCH] gui/applets: catch duplicate applet UIDs (#430) --- artiq/gui/applets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/gui/applets.py b/artiq/gui/applets.py index 09a1fe56c..be9ebd6b0 100644 --- a/artiq/gui/applets.py +++ b/artiq/gui/applets.py @@ -288,6 +288,7 @@ class AppletsDock(QtWidgets.QDockWidget): if uid is None: uid = next(iter(set(range(len(self.applet_uids) + 1)) - self.applet_uids)) + assert uid not in self.applet_uids self.applet_uids.add(uid) row = self.table.rowCount() @@ -328,7 +329,6 @@ class AppletsDock(QtWidgets.QDockWidget): self.applet_uids.remove(item.applet_uid) self.table.removeRow(row) - async def stop(self): for row in range(self.table.rowCount()): dock = self.table.item(row, 0).applet_dock