From: Stefan Neis Date: Mon, 14 Feb 2000 19:27:40 +0000 (+0000) Subject: Fixed SetCurrentCell. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dce4122902e200488cc9e4c30b540f11478f66a2 Fixed SetCurrentCell. Fixed CalcCellsExposed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 9f9eb205e4..58efa2ce3d 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -2301,7 +2301,7 @@ void wxGrid::CalcCellsExposed( wxRegion& reg ) int colLeft, rowTop; 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]; if ( rowTop > bottom ) break; @@ -2310,7 +2310,7 @@ void wxGrid::CalcCellsExposed( wxRegion& reg ) 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]; if ( colLeft > right ) break; @@ -3687,7 +3687,7 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords ) // Clear the old current cell highlight 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 ); }