Don't assume text is on LAYER_DEVICE.

Fixes https://gitlab.com/kicad/code/kicad/issues/12707
This commit is contained in:
Jeff Young 2022-10-21 22:03:04 +01:00
parent ce2dbdec75
commit bad410948d
1 changed files with 2 additions and 2 deletions

View File

@ -748,7 +748,7 @@ bool SCH_PAINTER::setDeviceColors( const LIB_ITEM* aItem, int aLayer, bool aDimm
{ {
m_gal->SetIsStroke( true ); m_gal->SetIsStroke( true );
m_gal->SetLineWidth( getLineWidth( aItem, false ) ); m_gal->SetLineWidth( getLineWidth( aItem, false ) );
m_gal->SetStrokeColor( getRenderColor( aItem, LAYER_DEVICE, false, aDimmed ) ); m_gal->SetStrokeColor( getRenderColor( aItem, aLayer, false, aDimmed ) );
} }
else else
{ {
@ -997,7 +997,7 @@ void SCH_PAINTER::draw( const LIB_TEXT* aText, int aLayer, bool aDimmed )
if( drawingShadows && !( aText->IsBrightened() || aText->IsSelected() ) ) if( drawingShadows && !( aText->IsBrightened() || aText->IsSelected() ) )
return; return;
COLOR4D color = getRenderColor( aText, LAYER_DEVICE, drawingShadows, aDimmed ); COLOR4D color = getRenderColor( aText, aLayer, drawingShadows, aDimmed );
if( !aText->IsVisible() ) if( !aText->IsVisible() )
{ {