Avoid a use of wxClientDC for drawing

Just refresh the cell if the highlight color is changed
This commit is contained in:
Paul Cornett
2022-01-17 08:40:29 -08:00
parent 94b4f738d4
commit 8cfdabd50d

View File

@@ -9010,13 +9010,7 @@ void wxGrid::SetCellHighlightColour( const wxColour& colour )
{
m_cellHighlightColour = colour;
wxGridWindow *gridWindow = CellToGridWindow(m_currentCellCoords);
wxClientDC dc( gridWindow );
PrepareDCFor( dc, gridWindow );
wxGridCellAttrPtr attr = GetCellAttrPtr(m_currentCellCoords);
DrawCellHighlight(dc, attr.get());
RefreshBlock(m_currentCellCoords, m_currentCellCoords);
}
}