diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-28 19:51:37 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-28 19:51:37 +0100 |
commit | da359f8c770bac754234e0f899058b25126cd476 (patch) | |
tree | d519267334d9526f21a3cf39c86d5f8ba916ce7a /module/gui/Queue.py | |
parent | Fixed DLC (diff) | |
download | pyload-da359f8c770bac754234e0f899058b25126cd476.tar.xz |
gui: easier package management
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) |