Don't redraw current cell when the grid is frozen

Don't update the grid appearance when inside a sequence of batch
operations, it will be updated at the end of it anyhow and doing it in
the middle only results in extra flicker.
This commit is contained in:
Vadim Zeitlin
2019-12-03 02:56:46 +01:00
parent e0b8ef85f2
commit 90d547feb6

View File

@@ -5759,13 +5759,16 @@ bool wxGrid::SetCurrentCell( const wxGridCellCoords& coords )
m_currentCellCoords = coords; m_currentCellCoords = coords;
wxGridCellAttr *attr = GetCellAttr( coords );
#if !defined(__WXMAC__) #if !defined(__WXMAC__)
if ( !GetBatchCount() )
{
wxGridCellAttr *attr = GetCellAttr( coords );
wxClientDC dc( currentGridWindow ); wxClientDC dc( currentGridWindow );
PrepareDCFor(dc, currentGridWindow); PrepareDCFor(dc, currentGridWindow);
DrawCellHighlight( dc, attr ); DrawCellHighlight( dc, attr );
#endif
attr->DecRef(); attr->DecRef();
}
#endif
return true; return true;
} }