mirror of https://github.com/m-labs/artiq.git
gui/applets: catch duplicate applet UIDs (#430)
This commit is contained in:
parent
bcfb01bc7e
commit
dec323b097
|
@ -372,6 +372,7 @@ class AppletsDock(QtWidgets.QDockWidget):
|
||||||
if uid is None:
|
if uid is None:
|
||||||
uid = next(iter(set(range(len(self.applet_uids) + 1))
|
uid = next(iter(set(range(len(self.applet_uids) + 1))
|
||||||
- self.applet_uids))
|
- self.applet_uids))
|
||||||
|
assert uid not in self.applet_uids
|
||||||
self.applet_uids.add(uid)
|
self.applet_uids.add(uid)
|
||||||
|
|
||||||
row = self.table.rowCount()
|
row = self.table.rowCount()
|
||||||
|
@ -413,7 +414,6 @@ class AppletsDock(QtWidgets.QDockWidget):
|
||||||
self.applet_uids.remove(item.applet_uid)
|
self.applet_uids.remove(item.applet_uid)
|
||||||
self.table.removeRow(row)
|
self.table.removeRow(row)
|
||||||
|
|
||||||
|
|
||||||
async def stop(self):
|
async def stop(self):
|
||||||
for row in range(self.table.rowCount()):
|
for row in range(self.table.rowCount()):
|
||||||
dock = self.table.item(row, 0).applet_dock
|
dock = self.table.item(row, 0).applet_dock
|
||||||
|
|
Loading…
Reference in New Issue