Avoid a use of wxClientDC for drawing
Just refresh the cell if the highlight color is changed
This commit is contained in:
@@ -9010,13 +9010,7 @@ void wxGrid::SetCellHighlightColour( const wxColour& colour )
|
|||||||
{
|
{
|
||||||
m_cellHighlightColour = colour;
|
m_cellHighlightColour = colour;
|
||||||
|
|
||||||
wxGridWindow *gridWindow = CellToGridWindow(m_currentCellCoords);
|
RefreshBlock(m_currentCellCoords, m_currentCellCoords);
|
||||||
|
|
||||||
wxClientDC dc( gridWindow );
|
|
||||||
PrepareDCFor( dc, gridWindow );
|
|
||||||
|
|
||||||
wxGridCellAttrPtr attr = GetCellAttrPtr(m_currentCellCoords);
|
|
||||||
DrawCellHighlight(dc, attr.get());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user