From 09ac2ff97f48d6837438f3bc20b1228e93be3c5d Mon Sep 17 00:00:00 2001 From: rmottola Date: Sat, 26 Oct 2013 15:50:02 +0000 Subject: [PATCH] * Source/NSTextView.m (-mouseDown:): Use container origin for attachment cells. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37283 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSTextView.m | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd8ce829c..46c9760da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-26 Fred Kiefer + + * Source/NSTextView.m (-mouseDown:): Use container origin for + attachment cells. + 2013-10-26 Fred Kiefer * Source/NSMenuView.m (-heightForItem:): Use diff --git a/Source/NSTextView.m b/Source/NSTextView.m index a48d43acb..a8c40713f 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -5573,12 +5573,14 @@ other than copy/paste or dragging. */ cellFrame.origin = [_layoutManager locationForGlyphAtIndex: glyphIndex]; + cellFrame.origin.x += lfRect.origin.x; + cellFrame.origin.y += lfRect.origin.y; + cellFrame.origin.x += _textContainerOrigin.x; + cellFrame.origin.y += _textContainerOrigin.y; cellFrame.size = [_layoutManager attachmentSizeForGlyphAtIndex: glyphIndex]; cellFrame.origin.y -= cellFrame.size.height; - cellFrame.origin.x += lfRect.origin.x; - cellFrame.origin.y += lfRect.origin.y; /* TODO: What about the insertion point ? */ if ([cell wantsToTrackMouseForEvent: theEvent