]> granicus.if.org Git - transmission/commitdiff
#1550 Not being able to deselect all transfers by clicking in the empty field
authorMitchell Livingston <livings124@transmissionbt.com>
Wed, 3 Dec 2008 00:29:45 +0000 (00:29 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Wed, 3 Dec 2008 00:29:45 +0000 (00:29 +0000)
macosx/TorrentTableView.m

index a096b7074bd1603aa0d13cc974d39ba5bd826656..f958036b2bc38f9c38b4ecb250c01256766cd3c6 100644 (file)
     
     BOOL pushed;
     if ([NSApp isOnLeopardOrBetter])
-        pushed = fMouseActionRow == row || fMouseRevealRow == row || fMouseControlRow == row;
+        pushed = row != -1 && (fMouseActionRow == row || fMouseRevealRow == row || fMouseControlRow == row);
     else
         pushed = [self pointInControlRect: point] || [self pointInRevealRect: point] || [self pointInActionRect: point];
     
     fSelectedValues = nil;
     
     //avoid weird behavior when showing menu by doing this after mouse down
-    if ([NSApp isOnLeopardOrBetter] ? fMouseActionRow == row : [self pointInActionRect: point])
+    if ([NSApp isOnLeopardOrBetter] ? row != -1 && fMouseActionRow == row : [self pointInActionRect: point])
     {
         fActionPushedRow = row;
         [self setNeedsDisplayInRect: [self rectOfRow: row]]; //ensure button is pushed down