Ignore:
Timestamp:
Jan 14, 2012, 8:11:51 PM (10 years ago)
Author:
livings124
Message:

improve on r13164

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r13164 r13165  
    24042404            [fDisplayedTorrents setArray: [groupsByIndex allValues]];
    24052405           
     2406            //we need the groups to be sorted, and we can do it without moving items in the table, too!
     2407            NSSortDescriptor * groupDescriptor = [NSSortDescriptor sortDescriptorWithKey: @"groupOrderValue" ascending: YES];
     2408            [fDisplayedTorrents sortUsingDescriptors: [NSArray arrayWithObject: groupDescriptor]];
     2409        }
     2410        else
     2411            [fDisplayedTorrents setArray: allTorrents];
     2412       
     2413        if (onLion)
     2414            [fTableView insertItemsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [fDisplayedTorrents count])] inParent: nil withAnimation: NSTableViewAnimationEffectFade];
     2415       
     2416        if (groupRows)
     2417        {
    24062418            //actually expand group rows
    24072419            for (TorrentGroup * group in fDisplayedTorrents)
    24082420                [fTableView expandItem: group];
    2409            
    2410             //we need the groups to be sorted, and we can do it without moving items in the table, too!
    2411             NSSortDescriptor * groupDescriptor = [NSSortDescriptor sortDescriptorWithKey: @"groupOrderValue" ascending: YES];
    2412             [fDisplayedTorrents sortUsingDescriptors: [NSArray arrayWithObject: groupDescriptor]];
    2413         }
    2414         else
    2415             [fDisplayedTorrents setArray: allTorrents];
    2416        
    2417         if (onLion)
    2418             [fTableView insertItemsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [fDisplayedTorrents count])] inParent: nil withAnimation: NSTableViewAnimationEffectFade];
     2421        }
    24192422       
    24202423        if (selectedValues)
Note: See TracChangeset for help on using the changeset viewer.