mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:40: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
5df876a8bf
commit
3e52072875
1 changed files with 33 additions and 30 deletions
|
@ -1666,37 +1666,40 @@ static SEL getSel = @selector(objectAtIndex:);
|
||||||
dequeue: YES];
|
dequeue: YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
// the mouse went up.
|
// the mouse went up.
|
||||||
// if it was inside a cell, the cell has already sent the action.
|
// 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
|
// 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.
|
// it's state is Off. It must be set into a consistent state.
|
||||||
// anyway, the action has to be sent
|
// anyway, the action has to be sent
|
||||||
if (!mouseUpInCell)
|
if (!mouseUpInCell)
|
||||||
{
|
{
|
||||||
if ((mode == NSRadioModeMatrix) && !allowsEmptySelection)
|
if ((mode == NSRadioModeMatrix) && !allowsEmptySelection)
|
||||||
{
|
{
|
||||||
[_selectedCell setState: NSOnState];
|
[_selectedCell setState: NSOnState];
|
||||||
[window flushWindow];
|
[window flushWindow];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_selectedCell != nil)
|
if (_selectedCell != nil)
|
||||||
{
|
{
|
||||||
selectedCells[_selectedRow][_selectedColumn] = NO;
|
selectedCells[_selectedRow][_selectedColumn] = NO;
|
||||||
_selectedCell = nil;
|
_selectedCell = nil;
|
||||||
_selectedRow = _selectedColumn = -1;
|
_selectedRow = _selectedColumn = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[self sendAction];
|
[self sendAction];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (highlightedCell)
|
if (_target && _doubleAction && ([theEvent clickCount] > 1))
|
||||||
{
|
[_target performSelector: _doubleAction withObject: self];
|
||||||
[self highlightCell: NO
|
|
||||||
atRow: highlightedRow
|
if (highlightedCell)
|
||||||
column: highlightedColumn];
|
{
|
||||||
[window flushWindow];
|
[self highlightCell: NO
|
||||||
}
|
atRow: highlightedRow
|
||||||
|
column: highlightedColumn];
|
||||||
|
[window flushWindow];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue