Fill gc with background color before copying to clipboard

Fixes https://gitlab.com/kicad/code/kicad/issues/7995
This commit is contained in:
Jonathan Haas 2021-04-12 15:38:10 +02:00 committed by Jonathan Haas
parent 929e535f0c
commit 0593f3b0c3
1 changed files with 5 additions and 0 deletions

View File

@ -1070,6 +1070,11 @@ void SCH_EDIT_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
{
wxString fileName = Prj().AbsolutePath( GetScreen()->GetFileName() );
const wxBrush& brush =
wxBrush( GetColorSettings()->GetColor( LAYER_SCHEMATIC_BACKGROUND ).ToColour() );
aSettings->GetPrintDC()->SetBackground( brush );
aSettings->GetPrintDC()->Clear();
aSettings->GetPrintDC()->SetLogicalFunction( wxCOPY );
GetScreen()->Print( aSettings );
PrintDrawingSheet( aSettings, GetScreen(), IU_PER_MILS, fileName );