]> granicus.if.org Git - transmission/commitdiff
Qt: Fix bad downloaded percentage in DetailsDialog
authordubhater <cantabile.desu@gmail.com>
Thu, 8 Mar 2018 12:12:52 +0000 (14:12 +0200)
committerMike Gelfand <mikedld@mikedld.com>
Fri, 6 Apr 2018 19:47:11 +0000 (22:47 +0300)
It was always 0.0% as long as the torrent was not finished.

qt/DetailsDialog.cc

index bb825cf4780a600a2f760d9683a098997ffad906..6716d569fb438f2090be635da856924133ba3ca7 100644 (file)
@@ -442,7 +442,7 @@ DetailsDialog::refresh ()
             }
         }
 
-      const double d = 100.0 * (sizeWhenDone ? (sizeWhenDone - leftUntilDone) / sizeWhenDone : 1);
+      const double d = sizeWhenDone ? 100.0 * (sizeWhenDone - leftUntilDone) / sizeWhenDone : 100.0;
       QString pct = Formatter::percentToString (d);
 
       if (!haveUnverified && !leftUntilDone)