Fix clipping of cell contents in wxGrid

Use wxDCClipper, now that it doesn't lose the previously set clipping
region any more, in wxGridCellStringRenderer::Draw() to ensure that we
don't overflow the area allocated for the cell.

Closes #17872.
This commit is contained in:
jonkraber
2017-12-24 15:43:20 +01:00
committed by Vadim Zeitlin
parent ba719c576e
commit 7f52ff751f
2 changed files with 5 additions and 4 deletions

View File

@@ -1871,7 +1871,10 @@ void wxGrid::Render( wxDC& dc,
dc.DrawRectangle( pointOffSet, sizeCells );
// draw cells
DrawGridCellArea( dc, renderCells );
{
wxDCClipper clipper( dc, wxRect(pointOffSet, sizeCells) );
DrawGridCellArea( dc, renderCells );
}
// draw grid lines
if ( style & wxGRID_DRAW_CELL_LINES )