Plot pads in layer color

v6 pads are not allowed to be a different color from the rest of the
copper layer, so don't query the GAL layer for a color

Fixes https://gitlab.com/kicad/code/kicad/issues/10293

(cherry picked from commit bfca928900)
This commit is contained in:
Seth Hillbrand 2022-01-07 08:55:11 -08:00
parent 3d88f37949
commit 26c0a78947
2 changed files with 6 additions and 6 deletions

View File

@ -204,6 +204,8 @@ wxColour COLOR4D::ToColour() const
return colour;
}
#endif
COLOR4D COLOR4D::LegacyMix( const COLOR4D& aColor ) const
{
@ -237,8 +239,6 @@ void COLOR4D::FromU32( unsigned int aPackedColor )
a = c.Alpha() / 255.0;
}
#endif
namespace KIGFX {

View File

@ -270,11 +270,11 @@ void PlotStandardLayer( BOARD* aBoard, PLOTTER* aPlotter, LSET aLayerMask,
COLOR4D color = COLOR4D::BLACK;
if( pad->GetLayerSet()[B_Cu] )
color = aPlotOpt.ColorSettings()->GetColor( LAYER_PAD_BK );
if( ( pad->GetLayerSet() & aLayerMask )[B_Cu] )
color = aPlotOpt.ColorSettings()->GetColor( B_Cu );
if( pad->GetLayerSet()[F_Cu] )
color = color.LegacyMix( aPlotOpt.ColorSettings()->GetColor( LAYER_PAD_FR ) );
if( ( pad->GetLayerSet() & aLayerMask )[F_Cu] )
color = color.LegacyMix( aPlotOpt.ColorSettings()->GetColor( F_Cu ) );
if( sketchPads && aLayerMask[F_Fab] )
color = aPlotOpt.ColorSettings()->GetColor( F_Fab );