X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4403ced6fc3f98873884ed0731e765a0b9af0a0f..4f2570aaf16049c11fc50d85cb15952e73bbab85:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 96af491707..4581b3cf38 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4202,8 +4202,8 @@ wxArrayInt wxGrid::CalcRowLabelsExposed( const wxRegion& reg ) wxRegionIterator iter( reg ); wxRect r; - wxArrayInt rowlabels; - + wxArrayInt rowlabels; + int top, bottom; while ( iter ) { @@ -5818,7 +5818,7 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords ) // Otherwise refresh redraws the highlight! m_currentCellCoords = coords; - + DrawGridCellArea(dc,cells); DrawAllGridLines( dc, r ); } @@ -6911,6 +6911,7 @@ bool wxGrid::IsVisible( int row, int col, bool wholeCellVisible ) // void wxGrid::MakeCellVisible( int row, int col ) { + int i; int xpos = -1, ypos = -1; @@ -6951,7 +6952,10 @@ void wxGrid::MakeCellVisible( int row, int col ) // we divide it later by GRID_SCROLL_LINE, make sure that we don't // have rounding errors (this is important, because if we do, we // might not scroll at all and some cells won't be redrawn) - ypos += GRID_SCROLL_LINE / 2; + // + // Sometimes GRID_SCROLL_LINE/2 is not enough, so just add a full + // scroll unit... + ypos += GRID_SCROLL_LINE; } if ( left < 0 ) @@ -6973,7 +6977,7 @@ void wxGrid::MakeCellVisible( int row, int col ) } // see comment for ypos above - xpos += GRID_SCROLL_LINE / 2; + xpos += GRID_SCROLL_LINE; } if ( xpos != -1 || ypos != -1 )