on 10.6 continue updating the remaining displayed trackers when adding a new tracker

This commit is contained in:
Mitchell Livingston 2009-09-29 23:56:48 +00:00
parent e0a6e6ae44
commit d53f271f73
1 changed files with 18 additions and 0 deletions

View File

@ -1448,6 +1448,24 @@ typedef enum
[fTrackerTable setTrackers: fTrackers];
[fTrackerTable reloadData];
}
else
{
if ([NSApp isOnSnowLeopardOrBetter])
{
NSIndexSet * addedIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange([fTrackers count]-2, 2)];
NSArray * tierAndTrackerBeingAdded = [fTrackers objectsAtIndexes: addedIndexes];
[fTrackers release];
fTrackers = [[torrent allTrackerStats] retain];
[fTrackers addObjectsFromArray: tierAndTrackerBeingAdded];
[fTrackerTable setTrackers: fTrackers];
NSIndexSet * updateIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [fTrackers count]-2)],
* columnIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [[fTrackerTable tableColumns] count])];
[fTrackerTable reloadDataForRowIndexes: updateIndexes columnIndexes: columnIndexes];
}
}
}
- (void) updateInfoPeers