SCH_PAINTER, draw filled LIB_SHAPE: fix incorrect selection of fill color.

This commit is contained in:
jean-pierre charras 2022-01-30 10:20:49 +01:00
parent b4826ce304
commit 64f2adbc31
1 changed files with 10 additions and 1 deletions

View File

@ -743,7 +743,16 @@ void SCH_PAINTER::draw( const LIB_SHAPE *aShape, int aLayer )
{
m_gal->SetIsFill( true );
m_gal->SetIsStroke( false );
m_gal->SetFillColor( aShape->GetFillColor() );
if( aShape->GetFillColor() == COLOR4D::UNSPECIFIED )
{
if( aShape->GetFillMode() == FILL_T::FILLED_SHAPE )
m_gal->SetFillColor( getRenderColor( aShape, LAYER_DEVICE, false ) );
else
m_gal->SetFillColor( color );
}
else
m_gal->SetFillColor( aShape->GetFillColor() );
drawShape( aShape );
}