mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-20 14:36:36 +00:00
* Source/NSTableView.m (-mouseDown:): Return early after tracking a
cell which prefersTrackingUntilMouseUp. * Source/NSPopUpButtonCell.m (+prefersTrackingUntilMouseUp:): Return yes. (-trackMouse:inRect:ofView:untilMouseUp:): Return yes or no depending on whether the mouse went up inside the menu or not. Fixes bug #18946 git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24465 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5dcabf4505
commit
16fcaeab83
3 changed files with 35 additions and 6 deletions
|
@ -3703,14 +3703,27 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
|||
* Can never get here from a dragging source
|
||||
* so they need to track in mouse up.
|
||||
*/
|
||||
|
||||
// FIXME we probably want to return from here
|
||||
// if the cell wants to track until mouse up,
|
||||
// which could cause selections if the mouse leaves the
|
||||
// cell frame?
|
||||
NSTableColumn *tb;
|
||||
NSCell *cell;
|
||||
|
||||
tb = [_tableColumns objectAtIndex: _clickedColumn];
|
||||
cell = [tb dataCellForRow: _clickedRow];
|
||||
|
||||
[self _trackCellAtColumn: _clickedColumn
|
||||
row: _clickedRow
|
||||
withEvent: theEvent];
|
||||
|
||||
if ([[cell class] prefersTrackingUntilMouseUp])
|
||||
{
|
||||
/* the mouse could have gone up outside of the cell
|
||||
* avoid selecting the row under mouse cursor */
|
||||
|
||||
/* FIXME this should really send the action
|
||||
* unfortunately the row isn't currently being
|
||||
* selected so that would send the action on the
|
||||
* wrong row. */
|
||||
return;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Since we may have tracked a cell which may have caused
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue