(hopefully) fix r10106 peer table resize issue

This commit is contained in:
Mitchell Livingston 2010-02-06 03:52:32 +00:00
parent e03d7dd658
commit cee284549b
1 changed files with 16 additions and 7 deletions

View File

@ -1261,11 +1261,6 @@ typedef enum
[fPeers release];
fPeers = nil;
[fPeerTable reloadData];
[fWebSeeds release];
fWebSeeds = nil;
[fWebSeedTable reloadData];
[self setWebSeedTableHidden: YES animate: YES];
}
[fFileController setTorrent: nil];
@ -1394,6 +1389,21 @@ typedef enum
[fFileFilterField setStringValue: @""];
[fWebSeeds release];
fWebSeeds = nil;
BOOL hasWebSeeds = NO;
for (Torrent * torrent in fTorrents)
if ([torrent webSeedCount] > 0)
{
hasWebSeeds = YES;
break;
}
if (!hasWebSeeds)
[fWebSeedTable reloadData];
[self setWebSeedTableHidden: !hasWebSeeds animate: YES];
//update stats and settings
[self updateInfoStats];
[self updateOptions];
@ -1636,7 +1646,6 @@ typedef enum
[fWebSeeds sortUsingDescriptors: [fWebSeedTable sortDescriptors]];
[fWebSeedTable reloadData];
[self setWebSeedTableHidden: [fWebSeeds count] == 0 animate: YES];
}
- (void) updateInfoFiles