Changeset 5004
- Timestamp:
- Feb 11, 2008, 12:16:47 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r5002 r5004 1805 1805 } 1806 1806 else 1807 previousTorrents = [NSMutableArray arrayWithArray: fDisplayedTorrents];1807 previousTorrents = fDisplayedTorrents; 1808 1808 1809 1809 NSArray * selectedValues = [fTableView selectedValues]; … … 1909 1909 } 1910 1910 1911 [fDisplayedTorrents setArray: [fTorrents objectsAtIndexes: indexes]];1911 NSArray * allTorrents = [fTorrents objectsAtIndexes: indexes]; 1912 1912 1913 1913 //set button tooltips … … 1919 1919 1920 1920 //clear display cache for not-shown torrents 1921 [previousTorrents removeObjectsInArray: fDisplayedTorrents];1921 [previousTorrents removeObjectsInArray: allTorrents]; 1922 1922 enumerator = [previousTorrents objectEnumerator]; 1923 1923 while ((torrent = [enumerator nextObject])) … … 1929 1929 { 1930 1930 NSSortDescriptor * groupDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"groupOrderValue" ascending: YES] autorelease]; 1931 [fDisplayedTorrents sortUsingDescriptors: [NSArray arrayWithObject: groupDescriptor]];1931 allTorrents = [allTorrents sortedArrayUsingDescriptors: [NSArray arrayWithObject: groupDescriptor]]; 1932 1932 1933 1933 NSMutableArray * groups = [NSMutableArray array], * groupTorrents; 1934 1934 int oldGroupValue = -2; 1935 for (i = 0; i < [ fDisplayedTorrents count]; i++)1936 { 1937 Torrent * torrent = [ fDisplayedTorrents objectAtIndex: i];1935 for (i = 0; i < [allTorrents count]; i++) 1936 { 1937 Torrent * torrent = [allTorrents objectAtIndex: i]; 1938 1938 int groupValue = [torrent groupValue]; 1939 1939 if (groupValue != oldGroupValue) … … 1952 1952 [fDisplayedTorrents setArray: groups]; 1953 1953 } 1954 else 1955 [fDisplayedTorrents setArray: allTorrents]; 1954 1956 1955 1957 //actually sort
Note: See TracChangeset
for help on using the changeset viewer.