From dfcdb18b4147634d4281d9af5708c92e4b836bf5 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 25 Jan 2011 16:55:29 +0000 Subject: [PATCH] Do not display 100% unless the torrent is complete --- src/properties/propertieswidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/properties/propertieswidget.cpp b/src/properties/propertieswidget.cpp index 33912c27c..daae2c7f3 100644 --- a/src/properties/propertieswidget.cpp +++ b/src/properties/propertieswidget.cpp @@ -370,7 +370,10 @@ void PropertiesWidget::loadDynamicData() { showPiecesAvailability(false); } // Progress - progress_lbl->setText(QString::number(h.progress()*100., 'f', 1)+"%"); + float progress = h.progress()*100.; + if(progress > 99.94 && progress < 100.) + progress = 99.9; + progress_lbl->setText(QString::number(progress, 'f', 1)+"%"); } else { showPiecesAvailability(false); showPiecesDownloaded(false);