Check all item layers before bailing.
Fixes: lp:1840986 * https://bugs.launchpad.net/kicad/+bug/1840986
This commit is contained in:
parent
83f147c414
commit
359ef0372c
|
@ -493,16 +493,24 @@ void SCH_PAINTER::draw( LIB_FIELD *aField, int aLayer )
|
||||||
if( drawingShadows && !aField->IsSelected() )
|
if( drawingShadows && !aField->IsSelected() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Must check layer as fields are sometimes drawn by their parent rather than
|
if( !isUnitAndConversionShown( aField ) )
|
||||||
// directly from the view.
|
|
||||||
int layers[KIGFX::VIEW::VIEW_MAX_LAYERS];
|
|
||||||
int layers_count;
|
|
||||||
aField->ViewGetLayers( layers, layers_count );
|
|
||||||
|
|
||||||
if( aLayer != layers[0] )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !isUnitAndConversionShown( aField ) )
|
// Must check layer as fields are sometimes drawn by their parent rather than
|
||||||
|
// directly from the view.
|
||||||
|
int layers[KIGFX::VIEW::VIEW_MAX_LAYERS];
|
||||||
|
int layers_count;
|
||||||
|
bool foundLayer = false;
|
||||||
|
|
||||||
|
aField->ViewGetLayers( layers, layers_count );
|
||||||
|
|
||||||
|
for( int i = 0; i < layers_count; ++i )
|
||||||
|
{
|
||||||
|
if( layers[i] == aLayer )
|
||||||
|
foundLayer = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !foundLayer )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
COLOR4D color = getRenderColor( aField, aLayer, drawingShadows );
|
COLOR4D color = getRenderColor( aField, aLayer, drawingShadows );
|
||||||
|
|
Loading…
Reference in New Issue