on mouse up/down only redisplay the affected row
This commit is contained in:
parent
b88ee80099
commit
58621c530b
|
@ -22,10 +22,6 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef TORRENTCELL_H
|
||||
#define TORRENTCELL_H
|
||||
|
||||
#import "Torrent.h"
|
||||
#import "CTGradient.h"
|
||||
|
||||
@interface TorrentCell : NSCell
|
||||
|
@ -44,5 +40,3 @@
|
|||
- (void) toggleMinimalStatus;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
|
||||
if ([self pointInActionRect: fClickPoint])
|
||||
{
|
||||
[self display]; //ensure button is pushed down
|
||||
[self setNeedsDisplayInRect: [self rectOfRow: [self rowAtPoint: fClickPoint]]]; //ensure button is pushed down
|
||||
[self displayTorrentMenuForEvent: event];
|
||||
fClickPoint = NSZeroPoint;
|
||||
}
|
||||
|
@ -146,8 +146,8 @@
|
|||
- (void) mouseUp: (NSEvent *) event
|
||||
{
|
||||
NSPoint point = [self convertPoint: [event locationInWindow] fromView: nil];
|
||||
int row = [self rowAtPoint: point];
|
||||
BOOL sameRow = row == [self rowAtPoint: fClickPoint];
|
||||
int row = [self rowAtPoint: point], oldRow = [self rowAtPoint: fClickPoint];
|
||||
BOOL sameRow = row == oldRow;
|
||||
|
||||
if (sameRow && [self pointInPauseRect: point] && [self pointInPauseRect: fClickPoint])
|
||||
{
|
||||
|
@ -180,7 +180,7 @@
|
|||
[super mouseUp: event];
|
||||
|
||||
fClickPoint = NSZeroPoint;
|
||||
[self display];
|
||||
[self setNeedsDisplayInRect: [self rectOfRow: oldRow]];
|
||||
}
|
||||
|
||||
- (NSMenu *) menuForEvent: (NSEvent *) event
|
||||
|
|
Loading…
Reference in New Issue