Applied two small patches.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22442 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2006-02-06 15:52:49 +00:00
parent 3750768e94
commit 2889c0f748
3 changed files with 20 additions and 6 deletions

View file

@ -1036,14 +1036,17 @@ static SEL getSel;
}
/**<p>Deselects all NSMatrix's cells. Does nothing if the NSMatrix's mode
is NSRadioModeMatrix and if it does not allows empty selection</p>
is NSRadioModeMatrix and if it does not allows empty selection.
Except for the case, when there are no cells left at all. Then the
selection is always cleared.</p>
<p>See Also: -mode -allowsEmptySelection -setNeedsDisplayInRect:</p>
*/
- (void) deselectAllCells
{
int i;
if (!_allowsEmptySelection && _mode == NSRadioModeMatrix)
if (_numRows > 0 && _numCols > 0 &&
!_allowsEmptySelection && _mode == NSRadioModeMatrix)
return;
for (i = 0; i < _numRows; i++)