Fixed SetCurrentCell.

Fixed CalcCellsExposed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis 2000-02-14 19:27:40 +00:00
parent d24ebec28b
commit dce4122902

View File

@ -2301,7 +2301,7 @@ void wxGrid::CalcCellsExposed( wxRegion& reg )
int colLeft, rowTop; int colLeft, rowTop;
for ( row = 0; row < m_numRows; row++ ) for ( row = 0; row < m_numRows; row++ )
{ {
if ( m_rowBottoms[row] < top ) continue; if ( m_rowBottoms[row] <= top ) continue;
rowTop = m_rowBottoms[row] - m_rowHeights[row]; rowTop = m_rowBottoms[row] - m_rowHeights[row];
if ( rowTop > bottom ) break; if ( rowTop > bottom ) break;
@ -2310,7 +2310,7 @@ void wxGrid::CalcCellsExposed( wxRegion& reg )
for ( col = 0; col < m_numCols; col++ ) for ( col = 0; col < m_numCols; col++ )
{ {
if ( m_colRights[col] < left ) continue; if ( m_colRights[col] <= left ) continue;
colLeft = m_colRights[col] - m_colWidths[col]; colLeft = m_colRights[col] - m_colWidths[col];
if ( colLeft > right ) break; if ( colLeft > right ) break;
@ -3687,7 +3687,7 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords )
// Clear the old current cell highlight // Clear the old current cell highlight
wxRect r = BlockToDeviceRect(m_currentCellCoords, m_currentCellCoords); wxRect r = BlockToDeviceRect(m_currentCellCoords, m_currentCellCoords);
r.x--; r.y--; r.width++; r.height++; m_currentCellCoords = coords; // Otherwise refresh redraws the hilit!
m_gridWin->Refresh( FALSE, &r ); m_gridWin->Refresh( FALSE, &r );
} }