Changeset 6276


Ignore:
Timestamp:
Jul 1, 2008, 3:11:58 PM (13 years ago)
Author:
livings124
Message:

fix bug where inspector would reset when changing transfer state (at the cost of the inspector not updating when a group is selected and a its content changes)

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r6274 r6276  
    20492049            if (groupValue != oldGroupValue)
    20502050            {
    2051                 TorrentGroup * group = [TorrentGroup groupForIndex: groupValue];
     2051                TorrentGroup * group = [[TorrentGroup alloc] initWithGroup: groupValue];
     2052                groupTorrents = [group torrents];
     2053               
    20522054                [fDisplayedTorrents addObject: group];
    2053                 groupTorrents = [group torrents];
     2055                [group release];
    20542056               
    20552057                oldGroupValue = groupValue;
     
    20652067    [self sortTorrentsIgnoreSelected];
    20662068    [fTableView selectValues: selectedValues];
    2067     [self resetInfo]; //if group is already selected, but the torrents in it change
     2069    //[self resetInfo]; //if group is already selected, but the torrents in it change
    20682070   
    20692071    //reset expanded/collapsed rows
  • trunk/macosx/TorrentGroup.h

    r6274 r6276  
    3131}
    3232
    33 + (id) groupForIndex: (int) group;
     33- (id) initWithGroup: (int) group;
    3434
    3535- (NSInteger) groupIndex;
  • trunk/macosx/TorrentGroup.m

    r6274 r6276  
    2525#import "TorrentGroup.h"
    2626
    27 @interface TorrentGroup (Private)
    28 
    29 - (id) initWithGroup: (int) group;
    30 
    31 @end
    32 
    3327@implementation TorrentGroup
    3428
    35 + (id) groupForIndex: (int) group
     29- (id) initWithGroup: (int) group
    3630{
    37     return [[[self alloc] initWithGroup: group] autorelease];
     31    if ((self = [super init]))
     32    {
     33        fGroup = group;
     34        fTorrents = [[NSMutableArray alloc] init];
     35    }
     36    return self;
    3837}
    3938
     
    5554
    5655@end
    57 
    58 @implementation TorrentGroup (Private)
    59 
    60 - (id) initWithGroup: (int) group
    61 {
    62     if ((self = [super init]))
    63     {
    64         fGroup = group;
    65         fTorrents = [[NSMutableArray alloc] init];
    66     }
    67     return self;
    68 }
    69 
    70 @end
Note: See TracChangeset for help on using the changeset viewer.