Small patch to NSTabView. by Andreas Höschler.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22976 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2006-05-23 21:15:14 +00:00
parent c85d393ca8
commit 3ebbcb3cab
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2006-05-23 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTabView.m (-tabViewItemAtPoint:, -mouseDown:): Moved
conversion of point with view transformation into the mouseDown:
method to be compatible with Cocoa.
Patch by Andreas Höschler <ahoesch@smartsoft.de>.
2006-05-20 18:25 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/GSNibCompatibility.m

View file

@ -700,13 +700,15 @@
// Event handling.
/*
* Find the tab view item containing the NSPoint point. This point
* is expected to be alreay in the coordinate system of the tab view.
*/
- (NSTabViewItem*) tabViewItemAtPoint: (NSPoint)point
{
int howMany = [_items count];
int i;
point = [self convertPoint: point fromView: nil];
for (i = 0; i < howMany; i++)
{
NSTabViewItem *anItem = [_items objectAtIndex: i];
@ -720,7 +722,8 @@
- (void) mouseDown: (NSEvent *)theEvent
{
NSPoint location = [theEvent locationInWindow];
NSPoint location = [self convertPoint: [theEvent locationInWindow]
fromView: nil];
NSTabViewItem *anItem = [self tabViewItemAtPoint: location];
if (anItem != nil && ![anItem isEqual: _selected])