[NSMatrix -sizeToFit] : This method now assumes that all cells have the

same size (this is what specification says). If it is not the case, weird
behaviour can happen ...


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10739 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Pierre-Yves Rivaille 2001-08-20 10:48:09 +00:00
parent bf358e75d1
commit 83dc0a3b13

View file

@ -1627,6 +1627,11 @@ static SEL getSel;
- (void) sizeToFit
{
NSSize newSize = NSZeroSize;
/*
* FIXME : Maybe this code be enabled in debug mode ?
* it would detect if all the cells have the same size
* or not
NSSize tmpSize;
int i, j;
@ -1641,6 +1646,12 @@ static SEL getSel;
newSize.height = tmpSize.height;
}
}
*/
if (_numRows > 0 && _numCols > 0)
newSize = [_cells[0][0] cellSize];
[self setCellSize: newSize];
}