Qt: Fix bad downloaded percentage in DetailsDialog

It was always 0.0% as long as the torrent was not finished.
This commit is contained in:
dubhater
2018-03-08 14:12:52 +02:00
committed by Mike Gelfand
parent ab4d707305
commit 85c0399d8c

View 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)