correct speed for non active downloads

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1633 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
alexandrut 2009-09-11 18:40:30 +00:00
parent f7b4c0cc69
commit cb79f8872e

View File

@ -703,7 +703,6 @@ void TransfersDialog::insertTransfers()
coreId = QString::fromStdString(info.fname) + getPeerName(pit->peerId);
fileSize = info.size;
progress = (info.transfered * 100.0) / info.size;
dlspeed = pit->tfRate * 1024.0;
sources = "";
if (retv && versions.end() != (vit = versions.find(pit->peerId))) {
sources = QString("rShare v") + QString::fromStdString(vit->second);
@ -727,6 +726,10 @@ void TransfersDialog::insertTransfers()
}
}
dlspeed = 0;
if (status == "Downloading")
dlspeed = pit->tfRate * 1024.0;
completed = info.transfered;
remaining = (info.size - info.transfered) / (pit->tfRate * 1024.0);