fix click in search field to select at the correct point in the text

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31944 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Doug Simons 2011-01-24 17:39:24 +00:00
parent 1a887c7645
commit d13b785e37
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2011-01-24 Doug Simons <doug.simons@testplant.com>
* Source/NSSearchFieldCell.m (-trackMouse:inRect:ofView:untilMouseUp:):
Pass mouseDown event to the field editor when click is in the field, to
select at the correct point in the text.
2011-01-24 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSWindow.m (-setFrameFromString:, -stringWithSavedFrame):

View file

@ -424,6 +424,15 @@
untilMouseUp: untilMouseUp];
}
NSText *currentEditor = ([controlView isKindOfClass:[NSControl class]]
? [(NSControl *)controlView currentEditor]
: nil);
if (currentEditor)
{
[currentEditor mouseDown: event];
return YES;
}
return [super trackMouse: event
inRect: [self searchTextRectForBounds: cellFrame]
ofView: controlView