From 1e37858cc498ad44a0f3449734221b96491ef884 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 26 Dec 2008 18:57:16 +0000 Subject: [PATCH] - Reset torrent display once it is queued --- src/FinishedTorrents.cpp | 3 +++ src/downloadingTorrents.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index b34caab2f..e0b235091 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -262,6 +262,9 @@ void FinishedTorrents::updateFinishedList(){ } else { finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/queued.png"))), Qt::DecorationRole); } + // Reset upload speed and seeds/leech + finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), 0.); + finishedListModel->setData(finishedListModel->index(row, F_LEECH), "0"); setRowColor(row, QString::fromUtf8("grey")); } if(h.is_paused() || h.is_queued()) continue; diff --git a/src/downloadingTorrents.cpp b/src/downloadingTorrents.cpp index a7ac852fb..03ca57459 100644 --- a/src/downloadingTorrents.cpp +++ b/src/downloadingTorrents.cpp @@ -520,6 +520,10 @@ void DownloadingTorrents::updateDlList() { DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1)); } } + // Reset speeds and seeds/leech + DLListModel->setData(DLListModel->index(row, DLSPEED), QVariant((double)0.)); + DLListModel->setData(DLListModel->index(row, UPSPEED), QVariant((double)0.)); + DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant("0/0")); setRowColor(row, QString::fromUtf8("grey")); } }