1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-28 10:38:45 +00:00

Merge pull request #547 from dubhater/patch-6

Qt: Fix bad downloaded percentage in DetailsDialog
This commit is contained in:
Mike Gelfand 2018-04-06 22:44:54 +03:00 committed by GitHub
commit 0b5ec3a00d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -513,7 +513,7 @@ void DetailsDialog::refresh()
}
}
double const d = 100.0 * (sizeWhenDone != 0 ? (sizeWhenDone - leftUntilDone) / sizeWhenDone : 1);
double const d = sizeWhenDone != 0 ? 100.0 * (sizeWhenDone - leftUntilDone) / sizeWhenDone : 100.0;
QString pct = Formatter::percentToString(d);
if (haveUnverified == 0 && leftUntilDone == 0)