Changeset 4853


Ignore:
Timestamp:
Jan 28, 2008, 2:06:02 PM (14 years ago)
Author:
livings124
Message:

fix a crash when removing torrents when showing groups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r4846 r4853  
    11651165   
    11661166    [fTorrents removeObjectsInArray: torrents];
    1167     [fDisplayedTorrents removeObjectsInArray: torrents];
    11681167   
    11691168    int lowestOrderValue = INT_MAX;
     
    22432242- (void) setLimitGlobalEnabled: (id) sender
    22442243{
    2245     [fDefaults setBool: sender == ([sender menu] == fUploadMenu ? fUploadLimitItem : fDownloadLimitItem)
    2246         forKey: [sender menu] == fUploadMenu ? @"CheckUpload" : @"CheckDownload"];
     2244    BOOL upload = [sender menu] == fUploadMenu;
     2245    [fDefaults setBool: sender == (upload ? fUploadLimitItem : fDownloadLimitItem) forKey: upload ? @"CheckUpload" : @"CheckDownload"];
    22472246   
    22482247    [fPrefsController applySpeedSettings: nil];
     
    22512250- (void) setQuickLimitGlobal: (id) sender
    22522251{
    2253     [fDefaults setInteger: [[sender representedObject] intValue] forKey: [sender menu] == fUploadMenu
    2254                 ? @"UploadLimit" : @"DownloadLimit"];
    2255     [fDefaults setBool: YES forKey: [sender menu] == fUploadMenu ? @"CheckUpload" : @"CheckDownload"];
     2252    BOOL upload = [sender menu] == fUploadMenu;
     2253    [fDefaults setInteger: [[sender representedObject] intValue] forKey: upload ? @"UploadLimit" : @"DownloadLimit"];
     2254    [fDefaults setBool: YES forKey: upload ? @"CheckUpload" : @"CheckDownload"];
    22562255   
    22572256    [fPrefsController updateLimitFields];
Note: See TracChangeset for help on using the changeset viewer.