* 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:
Matt Rice 2007-02-05 08:04:10 +00:00
parent 2d12498c2e
commit 1c2821470e
2 changed files with 15 additions and 5 deletions

View file

@ -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

View file

@ -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