From 76c5c63b50be83f192e4c87f00df7bf8a2c53241 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 16 Nov 2009 18:32:00 +0000 Subject: [PATCH] - Do not display total peer values if they are less than connected peers --- src/downloadingTorrents.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/downloadingTorrents.cpp b/src/downloadingTorrents.cpp index d4e4638ba..fe6d47fbf 100644 --- a/src/downloadingTorrents.cpp +++ b/src/downloadingTorrents.cpp @@ -605,10 +605,10 @@ bool DownloadingTorrents::updateTorrent(QTorrentHandle h) { } if(!downloadList->isColumnHidden(SEEDSLEECH)) { QString tmp = misc::toQString(h.num_seeds(), true); - if(h.num_complete() >= 0) + if(h.num_complete() >= h.num_seeds()) tmp.append(QString("(")+misc::toQString(h.num_complete())+QString(")")); tmp.append(QString("/")+misc::toQString(h.num_peers() - h.num_seeds(), true)); - if(h.num_incomplete() >= 0) + if(h.num_incomplete() >= (h.num_peers()-h.num_seeds())) tmp.append(QString("(")+misc::toQString(h.num_incomplete())+QString(")")); DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant(tmp)); }