refresh only necessary rows on mouse down

This commit is contained in:
Mitchell Livingston 2007-08-11 02:44:01 +00:00
parent 87147ad2be
commit 2e4d6a1142
1 changed files with 10 additions and 4 deletions

View File

@ -117,18 +117,26 @@
if ([self pointInActionRect: fClickPoint])
{
[self setNeedsDisplayInRect: [self rectOfRow: [self rowAtPoint: fClickPoint]]]; //ensure button is pushed down
int row = [self rowAtPoint: fClickPoint];
[self setNeedsDisplayInRect: [self rectOfRow: row]]; //ensure button is pushed down
[self displayTorrentMenuForEvent: event];
fClickPoint = NSZeroPoint;
[self setNeedsDisplayInRect: [self rectOfRow: row]];
}
else if ([self pointInPauseRect: fClickPoint] || [self pointInRevealRect: fClickPoint])
{
fClickIn = YES;
[self setNeedsDisplayInRect: [self rectOfRow: [self rowAtPoint: fClickPoint]]];
}
else
{
if ([event modifierFlags] & NSAlternateKeyMask)
{
[fDefaults setBool: ![fDefaults boolForKey: @"UseAdvancedBar"] forKey: @"UseAdvancedBar"];
fClickPoint = NSZeroPoint;
[self reloadData];
}
else
{
@ -136,14 +144,12 @@
{
[fDefaults setBool: ![fDefaults boolForKey: @"SmallStatusRegular"] forKey: @"SmallStatusRegular"];
fClickPoint = NSZeroPoint;
[self reloadData];
}
[super mouseDown: event];
}
}
#warning make more efficient
[self display];
}
- (void) mouseUp: (NSEvent *) event