aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextAndLinkCell.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTextAndLinkCell.m')
-rw-r--r--Source/SPTextAndLinkCell.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPTextAndLinkCell.m b/Source/SPTextAndLinkCell.m
index 2aefbff5..9759903d 100644
--- a/Source/SPTextAndLinkCell.m
+++ b/Source/SPTextAndLinkCell.m
@@ -183,7 +183,7 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect)
// Fast case for no link - make entire cell editable click area
if (!hasLink || !linkActive) return NSCellHitContentArea | NSCellHitEditableTextArea;
- NSPoint p = [[[NSApp mainWindow] contentView] convertPoint:[event locationInWindow] toView:controlView];
+ NSPoint p = [[[controlView window] contentView] convertPoint:[event locationInWindow] toView:controlView];
NSRect linkRect = SPTextLinkRectFromCellRect(cellFrame);
// Hit the link if it falls within the link rectangle for this cell, set when drawing
@@ -233,7 +233,7 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect)
// Capture the clicked row and cell
NSTableView *tableView = (NSTableView *)[self controlView];
- p = [[[NSApp mainWindow] contentView] convertPoint:[theEvent locationInWindow] toView:tableView];
+ p = [[[tableView window] contentView] convertPoint:[theEvent locationInWindow] toView:tableView];
lastLinkColumn = [tableView columnAtPoint:p];
lastLinkRow = [tableView rowAtPoint:p];