PG_CELL_RENDERER, PGPROPERTY_COLOR4D: clear DC before drawing the color swatch.

Otherwise the previous background can be displayed on the not redrawn area.
Fixes #15955
https://gitlab.com/kicad/code/kicad/-/issues/15955
This commit is contained in:
jean-pierre charras 2023-10-27 08:54:38 +02:00
parent 06074d9192
commit 4d593aa21e
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ bool PG_CELL_RENDERER::Render( wxDC &aDC, const wxRect &aRect, const wxPropertyG
int offset = ( aRect.GetHeight() - swatchSize.GetHeight() ) / 2;
wxRect swatch( aRect.GetPosition() + wxPoint( offset, offset ), swatchSize );
aDC.Clear(); // Ensure the "old" background is erased.
COLOR_SWATCH::RenderToDC( &aDC, color, colorProp->GetBackgroundColor(), swatch,
aGrid->ConvertDialogToPixels( CHECKERBOARD_SIZE_DU ),
aGrid->GetBackgroundColour() );