diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 6bbb1b1cb7..665a3bccee 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -525,11 +525,17 @@ bool SCH_PAINTER::setDeviceColors( const LIB_ITEM* aItem, int aLayer ) return false; case LAYER_DEVICE_BACKGROUND: - if( shape && shape->GetFillMode() == FILL_T::FILLED_WITH_BG_BODYCOLOR ) + if( shape ) { - COLOR4D fillColor = getRenderColor( aItem, LAYER_DEVICE_BACKGROUND, false ); + COLOR4D fillColor; + if( shape->GetFillMode() == FILL_T::FILLED_WITH_BG_BODYCOLOR ) + fillColor = getRenderColor( aItem, LAYER_DEVICE_BACKGROUND, false ); + else if( shape->GetFillMode() == FILL_T::FILLED_WITH_COLOR ) + fillColor = shape->GetFillColor(); + else + return false; - m_gal->SetIsFill( shape->GetFillMode() == FILL_T::FILLED_WITH_BG_BODYCOLOR ); + m_gal->SetIsFill( true ); m_gal->SetFillColor( fillColor ); m_gal->SetIsStroke( false ); return true;