mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
gui: fix periodic schedule sorting
This commit is contained in:
parent
6b283d78d3
commit
a363ad4a26
@ -66,11 +66,14 @@ class PeriodicStoreSyncer:
|
||||
else:
|
||||
del self.periodic_store[i]
|
||||
del self.order[i]
|
||||
ord_el = (x[0], prid)
|
||||
j = len(self.order)
|
||||
for i, o in enumerate(self.order):
|
||||
if o > (x[0], prid):
|
||||
if o > ord_el:
|
||||
j = i
|
||||
break
|
||||
self.periodic_store.insert(i, self._convert(prid, x))
|
||||
self.order.insert(i, (x[0], prid))
|
||||
self.periodic_store.insert(j, self._convert(prid, x))
|
||||
self.order.insert(j, ord_el)
|
||||
|
||||
def __delitem__(self, key):
|
||||
i = self._find_index(key)
|
||||
|
Loading…
Reference in New Issue
Block a user