#3017 fix the pieces bar for magnet links

This commit is contained in:
Mitchell Livingston 2010-03-07 02:46:49 +00:00
parent c83b9c5cb9
commit 5d4ecbcecf
1 changed files with 8 additions and 0 deletions

View File

@ -571,6 +571,14 @@
{
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);
float * piecesPercent = malloc(pieceCount * sizeof(float));
[torrent getAmountFinished: piecesPercent size: pieceCount];