2000-09-11 Mirko Viviani <mirko.viviani@rccr.cremona.it>

* Source/NSBrowser.m ([NSBrowser -_performLoadOfColumn:]): set
	intercell spacing to 0.
	* Source/NSMatrix.m ([NSMatrix -mouseDown:]): in NSRadioModeMatrix
	deselect the previous selected cell only if the cell is valid.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7471 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Mirko Viviani 2000-09-11 15:09:27 +00:00
parent df00948e11
commit be7706ee71
3 changed files with 21 additions and 11 deletions

View file

@ -1917,6 +1917,16 @@ static SEL getSel = @selector(objectAtIndex:);
column: &column
forPoint: lastLocation])
{
if ((_mode == NSRadioModeMatrix) && _selectedCell != nil)
{
[_selectedCell setState: NSOffState];
[self drawCellAtRow: _selectedRow column: _selectedColumn];
[_window flushWindow];
_selectedCells[_selectedRow][_selectedColumn] = NO;
_selectedCell = nil;
_selectedRow = _selectedColumn = -1;
}
if ([_cells[row][column] isSelectable])
{
NSText* t = [_window fieldEditor: YES forObject: self];
@ -1969,16 +1979,6 @@ static SEL getSel = @selector(objectAtIndex:);
withPeriod: 0.05];
ASSIGN(lastEvent, theEvent);
if ((_mode == NSRadioModeMatrix) && _selectedCell != nil)
{
[_selectedCell setState: NSOffState];
[self drawCellAtRow: _selectedRow column: _selectedColumn];
[_window flushWindow];
_selectedCells[_selectedRow][_selectedColumn] = NO;
_selectedCell = nil;
_selectedRow = _selectedColumn = -1;
}
// selection involves two steps, first
// a loop that continues until the left mouse goes up; then a series of
// steps which send actions and display the cell as it should appear after
@ -2036,7 +2036,7 @@ static SEL getSel = @selector(objectAtIndex:);
case NSRadioModeMatrix:
// Radio mode allows no more than one cell to be selected
if (previousCell == aCell)
if (previousCell == aCell || aCell == nil)
break;
// deselect previously selected cell