diff options
author | rowanbeentje <rowan@beent.je> | 2010-03-11 01:36:00 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-03-11 01:36:00 +0000 |
commit | 304ab84d1432207f4882386193405aa8fcb760d3 (patch) | |
tree | 9bac8baa6f7a25de55da1d4940ee46f9c55ff420 | |
parent | cc016857a5602f1defa6972ab8254e105ae1f4ba (diff) | |
download | sequelpro-304ab84d1432207f4882386193405aa8fcb760d3.tar.gz sequelpro-304ab84d1432207f4882386193405aa8fcb760d3.tar.bz2 sequelpro-304ab84d1432207f4882386193405aa8fcb760d3.zip |
- Improve SPTextAndLinkCell by not following links when the starting click was outside the link cell. Thanks to Brian Dunagan for this improvement ( http://www.bdunagan.com/2010/02/25/create-itunes-link-arrows/ )
-rw-r--r-- | Source/SPTextAndLinkCell.m | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/SPTextAndLinkCell.m b/Source/SPTextAndLinkCell.m index ac5cde0e..8eac562d 100644 --- a/Source/SPTextAndLinkCell.m +++ b/Source/SPTextAndLinkCell.m @@ -203,6 +203,9 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect) if (!NSMouseInRect(p, linkRect, [controlView isFlipped])) return [super trackMouse:theEvent inRect:cellFrame ofView:controlView untilMouseUp:untilMouseUp]; + // Ignore events other than mouse down. + if ([theEvent type] != NSLeftMouseDown) return YES; + // Continue tracking the mouse while it's down, updating the state as it enters and leaves the cell, // until it is released; if still within the cell, follow the link. BOOL mouseInButton = YES; |