[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSMatrix Bug Fix
From: |
Andreas Höschler |
Subject: |
NSMatrix Bug Fix |
Date: |
Sat, 17 Feb 2007 22:00:42 +0100 |
Hello all,
Bug: NSMatrix does not draw at all if isFlipped == NO
Solution: In NSMatrix.m replace
- (void)drawRect:(NSRect)rect
{
...
/* Draw the cells within the drawing rectangle. */
for (i = row1; i <= row2 && i < _numRows; i++)
for (j = col1; j <= col2 && j < _numCols; j++)
{
NSLog(@"_drawCellAtRow %d %d", i, j);
[self _drawCellAtRow: i column: j];
}
...
}
with
- (void)drawRect:(NSRect)rect
{
...
/* Draw the cells within the drawing rectangle. */
if (row1 > row2)
{
for (i = row1; i >= row2 && i < _numRows; i--)
for (j = col1; j <= col2 && j < _numCols; j++)
{
NSLog(@"_drawCellAtRow %d %d", i, j);
[self _drawCellAtRow: i column: j];
}
}
else
{
for (i = row1; i <= row2 && i < _numRows; i++)
for (j = col1; j <= col2 && j < _numCols; j++)
{
NSLog(@"_drawCellAtRow %d %d", i, j);
[self _drawCellAtRow: i column: j];
}
}
...
}
Don't forget to apply the same patch to Etoile.
Regards,
Andreas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- NSMatrix Bug Fix,
Andreas Höschler <=