mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Fix numberOfCells methods
This commit is contained in:
parent
195b162c7e
commit
0391347746
1 changed files with 4 additions and 6 deletions
|
@ -937,9 +937,8 @@
|
|||
|
||||
- (NSInteger) numberOfCells
|
||||
{
|
||||
NSUInteger ci = [_gridView indexOfColumn: self];
|
||||
NSArray *arr = [_gridView _cellsForColumnAtIndex: ci];
|
||||
return [arr count];
|
||||
// The number of cells in a column = # of rows
|
||||
return [_gridView numberOfRows];
|
||||
}
|
||||
|
||||
- (NSGridCell *) cellAtIndex: (NSInteger)index
|
||||
|
@ -1114,9 +1113,8 @@
|
|||
|
||||
- (NSInteger) numberOfCells
|
||||
{
|
||||
NSUInteger ri = [_gridView indexOfRow: self];
|
||||
NSArray *arr = [_gridView _cellsForRowAtIndex: ri];
|
||||
return [arr count];
|
||||
// The number of cells in a row = # of columns
|
||||
return [_gridView numberOfColumns];
|
||||
}
|
||||
|
||||
- (NSGridCell *) cellAtIndex: (NSInteger)index
|
||||
|
|
Loading…
Reference in a new issue