Avoid drawing netnames when not in board editor

Shouldn't be needed if we properly clear the netinfo but there's no
reason to keep netnames so better to avoid possible issues

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16981
This commit is contained in:
Seth Hillbrand 2024-02-15 17:16:20 -08:00
parent c48fc7ebff
commit 08bdf1abae
1 changed files with 1 additions and 1 deletions

View File

@ -1694,7 +1694,7 @@ void PCB_PAINTER::draw( const PCB_SHAPE* aShape, int aLayer )
int thickness = getLineThickness( aShape->GetWidth() );
LINE_STYLE lineStyle = aShape->GetStroke().GetLineStyle();
if( IsNetnameLayer( aLayer ) )
if( IsNetnameLayer( aLayer ) && m_frameType == FRAME_T::FRAME_PCB_EDITOR )
{
if( !pcbconfig() || pcbconfig()->m_Display.m_NetNames < 2 )
return;