mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 08:21:27 +00:00
hit test processed with row == -1
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37360 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e1498b311a
commit
7bfd4dfad0
1 changed files with 10 additions and 6 deletions
|
@ -3633,11 +3633,15 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
|||
|
||||
- (NSUInteger)_hitTestForEvent:(NSEvent*)event atColumn:(NSInteger)column row:(NSInteger)row
|
||||
{
|
||||
NSCell *cell = [self preparedCellAtColumn: column row: row];
|
||||
NSRect cellFrame = [self frameOfCellAtColumn:(column == -1) ? 0 : column row:row];
|
||||
|
||||
// Return the hit result...
|
||||
return([cell hitTestForEvent:event inRect:cellFrame ofView:self]);
|
||||
if (row >= 0)
|
||||
{
|
||||
NSCell *cell = [self preparedCellAtColumn: column row: row];
|
||||
NSRect cellFrame = [self frameOfCellAtColumn:(column == -1) ? 0 : column row:row];
|
||||
|
||||
// Return the hit result...
|
||||
return([cell hitTestForEvent:event inRect:cellFrame ofView:self]);
|
||||
}
|
||||
return(NSCellHitNone);
|
||||
}
|
||||
|
||||
- (void) mouseDown: (NSEvent *)theEvent
|
||||
|
@ -3670,7 +3674,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
|||
_clickedRow = [self rowAtPoint: location];
|
||||
_clickedColumn = [self columnAtPoint: location];
|
||||
|
||||
if ([theEvent type] == NSLeftMouseDown)
|
||||
if ((_clickedRow != -1) && ([theEvent type] == NSLeftMouseDown))
|
||||
{
|
||||
// If the cell processed the mouse hit...
|
||||
NSInteger theColumn = _clickedColumn;
|
||||
|
|
Loading…
Reference in a new issue