mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
* Source/NSTableView (-mouseDown:): Release oldSelectedRows.
Mark done as yes instead of returning early, and avoid sending action multiple times. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24469 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2d12498c2e
commit
1c2821470e
2 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-02-04 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
* Source/NSTableView (-mouseDown:): Release oldSelectedRows.
|
||||
Mark done as yes instead of returning early, and avoid sending action
|
||||
multiple times.
|
||||
|
||||
2007-02-04 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
* Source/NSTableView (-mouseDown:): Compute the selection immediately
|
||||
|
|
|
@ -3564,6 +3564,7 @@ if (currentRow >= 0 && currentRow < _numberOfRows) \
|
|||
int oldRow = -1;
|
||||
int currentRow = -1;
|
||||
BOOL getNextEvent = YES;
|
||||
BOOL sendAction = NO;
|
||||
|
||||
if (_allowsMultipleSelection == YES)
|
||||
{
|
||||
|
@ -3735,10 +3736,8 @@ if (currentRow >= 0 && currentRow < _numberOfRows) \
|
|||
{
|
||||
/* the mouse could have gone up outside of the cell
|
||||
* avoid selecting the row under mouse cursor */
|
||||
|
||||
if (_clickedRow != -1)
|
||||
[self sendAction: _action to: _target];
|
||||
return;
|
||||
sendAction = YES;
|
||||
done = YES;
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
@ -3838,9 +3837,14 @@ if (currentRow >= 0 && currentRow < _numberOfRows) \
|
|||
{
|
||||
[self _postSelectionDidChangeNotification];
|
||||
}
|
||||
|
||||
RELEASE(oldSelectedRows);
|
||||
|
||||
if (!mouseMoved)
|
||||
sendAction = YES;
|
||||
|
||||
/* If this was a simple click (ie. no dragging), we send our action. */
|
||||
if (!mouseMoved)
|
||||
if (sendAction)
|
||||
{
|
||||
/*
|
||||
_clickedRow and _clickedColumn are already set at the start of
|
||||
|
|
Loading…
Reference in a new issue