diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index d6309a49f..b1bcb186c 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -297,6 +297,8 @@ NSRect revealRect = [self revealButtonRectForBounds: cellFrame]; BOOL checkReveal = NSMouseInRect(point, revealRect, [controlView isFlipped]); + [(TorrentTableView *)controlView removeButtonTrackingAreas]; + while ([event type] != NSLeftMouseUp) { point = [controlView convertPoint: [event locationInWindow] fromView: nil]; @@ -346,6 +348,8 @@ } else; + [controlView updateTrackingAreas]; + return YES; } diff --git a/macosx/TorrentTableView.h b/macosx/TorrentTableView.h index f93e886e3..0a2ae9575 100644 --- a/macosx/TorrentTableView.h +++ b/macosx/TorrentTableView.h @@ -48,6 +48,8 @@ - (void) setTorrents: (NSArray *) torrents; +- (void) removeButtonTrackingAreas; + - (void) toggleControlForTorrent: (Torrent *) torrent; - (void) displayTorrentMenuForEvent: (NSEvent *) event; diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 72c8a4fa8..8c2fa2e44 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -94,16 +94,7 @@ { [super updateTrackingAreas]; - fMouseControlRow = -1; - fMouseRevealRow = -1; - - NSEnumerator * enumerator = [[self trackingAreas] objectEnumerator]; - NSTrackingArea * area; - while ((area = [enumerator nextObject])) - { - if ([area owner] == self && [[area userInfo] objectForKey: @"Row"]) - [self removeTrackingArea: area]; - } + [self removeButtonTrackingAreas]; NSRange visibleRows = [self rowsInRect: [self visibleRect]]; if (visibleRows.length == 0) @@ -123,6 +114,20 @@ } } +- (void) removeButtonTrackingAreas +{ + fMouseControlRow = -1; + fMouseRevealRow = -1; + + NSEnumerator * enumerator = [[self trackingAreas] objectEnumerator]; + NSTrackingArea * area; + while ((area = [enumerator nextObject])) + { + if ([area owner] == self && [[area userInfo] objectForKey: @"Row"]) + [self removeTrackingArea: area]; + } +} + - (void) mouseEntered: (NSEvent *) event { NSDictionary * dict = (NSDictionary *)[event userData];