]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed SetCurrentCell.
authorStefan Neis <Stefan.Neis@t-online.de>
Mon, 14 Feb 2000 19:27:40 +0000 (19:27 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Mon, 14 Feb 2000 19:27:40 +0000 (19:27 +0000)
Fixed CalcCellsExposed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grid.cpp

index 9f9eb205e45cd70380e28fb82bf62914d5922726..58efa2ce3daa9af8f7c692834c2a0320028f3a7b 100644 (file)
@@ -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 );
     }