Changeset 13164
- Timestamp:
- Jan 14, 2012, 8:07:26 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r13163 r13164 1880 1880 BOOL sortByGroup = ![fDefaults boolForKey: @"SortByGroup"]; 1881 1881 [fDefaults setBool: sortByGroup forKey: @"SortByGroup"]; 1882 1883 //expand all groups1884 if (sortByGroup)1885 [fTableView removeAllCollapsedGroups];1886 1882 1887 1883 [self applyFilter]; … … 2375 2371 NSAssert(groupRows != wasGroupRows, @"Trying toggling group-torrent reordering when we weren't expecting to."); 2376 2372 2373 //set all groups as expanded 2374 [fTableView removeAllCollapsedGroups]; 2375 2377 2376 //since we're not doing this the right way (boo buggy animation), we need to remember selected values 2378 2377 #warning when Lion-only and using views instead of cells, this likely won't be needed … … 2405 2404 [fDisplayedTorrents setArray: [groupsByIndex allValues]]; 2406 2405 2406 //actually expand group rows 2407 for (TorrentGroup * group in fDisplayedTorrents) 2408 [fTableView expandItem: group]; 2409 2407 2410 //we need the groups to be sorted, and we can do it without moving items in the table, too! 2408 2411 NSSortDescriptor * groupDescriptor = [NSSortDescriptor sortDescriptorWithKey: @"groupOrderValue" ascending: YES]; … … 2414 2417 if (onLion) 2415 2418 [fTableView insertItemsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [fDisplayedTorrents count])] inParent: nil withAnimation: NSTableViewAnimationEffectFade]; 2416 2417 //reset expanded/collapsed rows2418 if (groupRows)2419 {2420 for (TorrentGroup * group in fDisplayedTorrents)2421 {2422 if ([fTableView isGroupCollapsed: [group groupIndex]])2423 [fTableView collapseItem: group];2424 else2425 [fTableView expandItem: group];2426 }2427 }2428 2419 2429 2420 if (selectedValues)
Note: See TracChangeset
for help on using the changeset viewer.