diff options
Diffstat (limited to 'module/gui/Queue.py')
-rw-r--r-- | module/gui/Queue.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/module/gui/Queue.py b/module/gui/Queue.py index c0f43c740..499cb5199 100644 --- a/module/gui/Queue.py +++ b/module/gui/Queue.py @@ -133,13 +133,17 @@ class Queue(QThread): def clear(self, ids): clear = False - for pack in ItemIterator(self.rootItem): + remove = [] + for k, pack in enumerate(ItemIterator(self.rootItem)): if not pack.getPackData()["id"] in ids: clear = True - break + remove.append(k) if not clear: return - self.rootItem.takeChildren() + remove.sort() + remove.reverse() + for k in remove: + self.rootItem.takeChild(k) def getWaitingProgress(self, q): locker = QMutexLocker(self.mutex) |