Changeset 9224


Ignore:
Timestamp:
Sep 29, 2009, 11:56:48 PM (13 years ago)
Author:
livings124
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r9221 r9224  
    14491449        [fTrackerTable reloadData];
    14501450    }
     1451    else
     1452    {
     1453        if ([NSApp isOnSnowLeopardOrBetter])
     1454        {
     1455            NSIndexSet * addedIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange([fTrackers count]-2, 2)];
     1456            NSArray * tierAndTrackerBeingAdded = [fTrackers objectsAtIndexes: addedIndexes];
     1457           
     1458            [fTrackers release];
     1459            fTrackers = [[torrent allTrackerStats] retain];
     1460            [fTrackers addObjectsFromArray: tierAndTrackerBeingAdded];
     1461           
     1462            [fTrackerTable setTrackers: fTrackers];
     1463           
     1464            NSIndexSet * updateIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [fTrackers count]-2)],
     1465                    * columnIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [[fTrackerTable tableColumns] count])];
     1466            [fTrackerTable reloadDataForRowIndexes: updateIndexes columnIndexes: columnIndexes];
     1467        }
     1468    }
    14511469}
    14521470
Note: See TracChangeset for help on using the changeset viewer.