Only reset the inspector when a magnetized transfer's metadata is retrieved if the transfer is selected

This commit is contained in:
Mitchell Livingston 2009-12-05 16:10:59 +00:00
parent f0e1db9c68
commit b9eb407af0
1 changed files with 8 additions and 1 deletions

View File

@ -77,6 +77,7 @@ typedef enum
@interface InfoWindowController (Private)
- (void) resetInfo;
- (void) resetInfoForTorrent: (NSNotification *) notification;
- (void) updateInfoGeneral;
- (void) updateInfoActivity;
@ -207,7 +208,7 @@ typedef enum
//allow for update notifications
NSNotificationCenter * nc = [NSNotificationCenter defaultCenter];
[nc addObserver: self selector: @selector(resetInfo) name: @"ResetInspector" object: nil];
[nc addObserver: self selector: @selector(resetInfoForTorrent:) name: @"ResetInspector" object: nil];
[nc addObserver: self selector: @selector(updateInfoStats) name: @"UpdateStats" object: nil];
[nc addObserver: self selector: @selector(updateOptions) name: @"UpdateOptions" object: nil];
}
@ -1403,6 +1404,12 @@ typedef enum
[self updateOptions];
}
- (void) resetInfoForTorrent: (NSNotification *) notification
{
if (fTorrents && [fTorrents containsObject: [notification object]])
[self resetInfo];
}
- (void) updateInfoGeneral
{
if ([fTorrents count] != 1)