From f75f6530b04d3724ba10b27277bb5499b0a70bbd Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Tue, 6 Jun 2000 10:35:28 +0000 Subject: [PATCH] More changes to SetCurrentCell. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index d8582390c9..0abf606854 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -5360,12 +5360,10 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords ) HideCellEditControl(); DisableCellEditControl(); - wxRect r; if ( IsVisible( m_currentCellCoords ) ) { + wxRect r; r = BlockToDeviceRect(m_currentCellCoords, m_currentCellCoords); - CalcCellsExposed( r ); - if ( !m_gridLinesEnabled ) { r.x--; @@ -5373,13 +5371,15 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords ) r.width++; r.height++; } + + CalcCellsExposed( r ); // Otherwise refresh redraws the highlight! m_currentCellCoords = coords; + + DrawGridCellArea(dc); + DrawAllGridLines( dc, r ); } - - DrawGridCellArea(dc); - DrawAllGridLines( dc, r ); } m_currentCellCoords = coords; @@ -5932,15 +5932,15 @@ void wxGrid::EndBatch() { if ( m_batchCount > 0 ) { - m_batchCount--; - if ( !m_batchCount ) - { - CalcDimensions(); - m_rowLabelWin->Refresh(); - m_colLabelWin->Refresh(); - m_cornerLabelWin->Refresh(); - m_gridWin->Refresh(); - } + m_batchCount--; + if ( !m_batchCount ) + { + CalcDimensions(); + m_rowLabelWin->Refresh(); + m_colLabelWin->Refresh(); + m_cornerLabelWin->Refresh(); + m_gridWin->Refresh(); + } } }