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