Run IsElementVisible() test on all markers, not just their shadows.
The view item doesn't always get its layers updated early enough for the paint. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16138
This commit is contained in:
parent
4a25ef164d
commit
85f760fc66
|
@ -2608,13 +2608,10 @@ void PCB_PAINTER::draw( const PCB_MARKER* aMarker, int aLayer )
|
||||||
{
|
{
|
||||||
bool isShadow = aLayer == LAYER_MARKER_SHADOWS;
|
bool isShadow = aLayer == LAYER_MARKER_SHADOWS;
|
||||||
|
|
||||||
// Don't paint shadows for invisible markers.
|
// Don't paint invisible markers.
|
||||||
// It would be nice to do this through layer dependencies but we can't do an "or" there today
|
// It would be nice to do this through layer dependencies but we can't do an "or" there today
|
||||||
if( isShadow && aMarker->GetBoard()
|
if( aMarker->GetBoard() && !aMarker->GetBoard()->IsElementVisible( aMarker->GetColorLayer() ) )
|
||||||
&& !aMarker->GetBoard()->IsElementVisible( aMarker->GetColorLayer() ) )
|
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
const_cast<PCB_MARKER*>( aMarker )->SetZoom( 1.0 / sqrt( m_gal->GetZoomFactor() ) );
|
const_cast<PCB_MARKER*>( aMarker )->SetZoom( 1.0 / sqrt( m_gal->GetZoomFactor() ) );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue