Changeset 393


Ignore:
Timestamp:
Jun 19, 2006, 4:30:36 AM (16 years ago)
Author:
livings124
Message:

Selecting the current sort item will force a resort of the torrents.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r389 r393  
    848848        prevSortItem = fDateSortItem;
    849849   
    850     if (sender == prevSortItem)
    851         return;
    852    
    853     [prevSortItem setState: NSOffState];
    854     [sender setState: NSOnState];
    855 
    856     [fSortType release];
    857     if (sender == fNameSortItem)
    858         fSortType = [[NSString alloc] initWithString: @"Name"];
    859     else if (sender == fStateSortItem)
    860         fSortType = [[NSString alloc] initWithString: @"State"];
    861     else if (sender == fProgressSortItem)
    862         fSortType = [[NSString alloc] initWithString: @"Progress"];
    863     else
    864         fSortType = [[NSString alloc] initWithString: @"Date"];
    865        
    866     [fDefaults setObject: fSortType forKey: @"Sort"];
     850    if (sender != prevSortItem)
     851    {
     852        [prevSortItem setState: NSOffState];
     853        [sender setState: NSOnState];
     854
     855        [fSortType release];
     856        if (sender == fNameSortItem)
     857            fSortType = [[NSString alloc] initWithString: @"Name"];
     858        else if (sender == fStateSortItem)
     859            fSortType = [[NSString alloc] initWithString: @"State"];
     860        else if (sender == fProgressSortItem)
     861            fSortType = [[NSString alloc] initWithString: @"Progress"];
     862        else
     863            fSortType = [[NSString alloc] initWithString: @"Date"];
     864           
     865        [fDefaults setObject: fSortType forKey: @"Sort"];
     866    }
    867867
    868868    [self sortTorrents];
Note: See TracChangeset for help on using the changeset viewer.