From 635f0f51f14efc534431333ce4961511a49d9ae8 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 20 Jan 2011 21:46:44 +0000 Subject: [PATCH] fixed display issue in last commit git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3969 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/FileTransferInfoWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/FileTransferInfoWidget.cpp b/retroshare-gui/src/gui/FileTransferInfoWidget.cpp index 7f69731a4..f002e9b0a 100644 --- a/retroshare-gui/src/gui/FileTransferInfoWidget.cpp +++ b/retroshare-gui/src/gui/FileTransferInfoWidget.cpp @@ -170,7 +170,7 @@ void FileTransferInfoWidget::draw(const FileInfo& nfo,const FileChunksInfo& info int size_of_this_chunk = ( info.active_chunks[i].first == info.chunks.size()-1 && ((info.file_size % blockSize)>0) )?(info.file_size % blockSize):blockSize ; uint32_t s = (uint32_t)rint(sizeX*(size_of_this_chunk - info.active_chunks[i].second)/(float)size_of_this_chunk) ; - std::cerr << "chunk " << info.active_chunks[i].first << ": Last received byte: " << size_of_this_chunk - info.active_chunks[i].second << std::endl; + //std::cerr << "chunk " << info.active_chunks[i].first << ": Last received byte: " << size_of_this_chunk - info.active_chunks[i].second << std::endl; // Already Downloaded. // @@ -197,7 +197,7 @@ void FileTransferInfoWidget::draw(const FileInfo& nfo,const FileChunksInfo& info painter->setPen(QColor::fromRgb(0,0,0)) ; float percent = (size_of_this_chunk - info.active_chunks[i].second)*100.0/size_of_this_chunk ; - painter->drawText(sizeX+55,y+text_height,QString::number(percent,'g',3) + " %") ; + painter->drawText(sizeX+55,y+text_height,QString::number(percent,'f',2) + " %") ; y += sizeY+block_sep ; }