only toggle the pieces view when a torrent is selected

This commit is contained in:
Mitchell Livingston 2010-04-06 01:44:38 +00:00
parent 909b710f04
commit f3f09f7488
1 changed files with 7 additions and 4 deletions

View File

@ -209,10 +209,13 @@ enum
- (void) mouseDown: (NSEvent *) event
{
const BOOL availability = ![[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"];
[[NSUserDefaults standardUserDefaults] setBool: availability forKey: @"PiecesViewShowAvailability"];
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdatePiecesView" object: self];
if (fTorrent)
{
const BOOL availability = ![[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"];
[[NSUserDefaults standardUserDefaults] setBool: availability forKey: @"PiecesViewShowAvailability"];
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdatePiecesView" object: self];
}
[super mouseDown: event];
}