mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 23:31:02 +00:00
[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:
parent
bf358e75d1
commit
83dc0a3b13
1 changed files with 11 additions and 0 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue