mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
#3017 fix the pieces bar for magnet links
This commit is contained in:
parent
c83b9c5cb9
commit
5d4ecbcecf
1 changed files with 8 additions and 0 deletions
|
@ -571,6 +571,14 @@
|
||||||
{
|
{
|
||||||
Torrent * torrent = [self representedObject];
|
Torrent * torrent = [self representedObject];
|
||||||
|
|
||||||
|
//fill an all-white bar for magnet links
|
||||||
|
if ([torrent isMagnet])
|
||||||
|
{
|
||||||
|
[[NSColor whiteColor] set];
|
||||||
|
NSRectFill(barRect);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
NSInteger pieceCount = MIN([torrent pieceCount], MAX_PIECES);
|
NSInteger pieceCount = MIN([torrent pieceCount], MAX_PIECES);
|
||||||
float * piecesPercent = malloc(pieceCount * sizeof(float));
|
float * piecesPercent = malloc(pieceCount * sizeof(float));
|
||||||
[torrent getAmountFinished: piecesPercent size: pieceCount];
|
[torrent getAmountFinished: piecesPercent size: pieceCount];
|
||||||
|
|
Loading…
Reference in a new issue