mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
Send double action
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5405 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
00c273aef7
commit
17c1c9b3bf
1 changed files with 33 additions and 30 deletions
|
@ -1666,37 +1666,40 @@ static SEL getSel = @selector(objectAtIndex:);
|
|||
dequeue: YES];
|
||||
}
|
||||
|
||||
// the mouse went up.
|
||||
// if it was inside a cell, the cell has already sent the action.
|
||||
// if not, _selectedCell is the last cell that had the mouse, and
|
||||
// it's state is Off. It must be set into a consistent state.
|
||||
// anyway, the action has to be sent
|
||||
if (!mouseUpInCell)
|
||||
{
|
||||
if ((mode == NSRadioModeMatrix) && !allowsEmptySelection)
|
||||
{
|
||||
[_selectedCell setState: NSOnState];
|
||||
[window flushWindow];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_selectedCell != nil)
|
||||
{
|
||||
selectedCells[_selectedRow][_selectedColumn] = NO;
|
||||
_selectedCell = nil;
|
||||
_selectedRow = _selectedColumn = -1;
|
||||
}
|
||||
}
|
||||
[self sendAction];
|
||||
}
|
||||
// the mouse went up.
|
||||
// if it was inside a cell, the cell has already sent the action.
|
||||
// if not, _selectedCell is the last cell that had the mouse, and
|
||||
// it's state is Off. It must be set into a consistent state.
|
||||
// anyway, the action has to be sent
|
||||
if (!mouseUpInCell)
|
||||
{
|
||||
if ((mode == NSRadioModeMatrix) && !allowsEmptySelection)
|
||||
{
|
||||
[_selectedCell setState: NSOnState];
|
||||
[window flushWindow];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_selectedCell != nil)
|
||||
{
|
||||
selectedCells[_selectedRow][_selectedColumn] = NO;
|
||||
_selectedCell = nil;
|
||||
_selectedRow = _selectedColumn = -1;
|
||||
}
|
||||
}
|
||||
[self sendAction];
|
||||
}
|
||||
|
||||
if (highlightedCell)
|
||||
{
|
||||
[self highlightCell: NO
|
||||
atRow: highlightedRow
|
||||
column: highlightedColumn];
|
||||
[window flushWindow];
|
||||
}
|
||||
if (_target && _doubleAction && ([theEvent clickCount] > 1))
|
||||
[_target performSelector: _doubleAction withObject: self];
|
||||
|
||||
if (highlightedCell)
|
||||
{
|
||||
[self highlightCell: NO
|
||||
atRow: highlightedRow
|
||||
column: highlightedColumn];
|
||||
[window flushWindow];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue