From 2e4d6a11427fb21999b741866f5414560b2cc918 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 11 Aug 2007 02:44:01 +0000 Subject: [PATCH] refresh only necessary rows on mouse down --- macosx/TorrentTableView.m | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index b83533629..ecbd08c0e 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -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