From 08bdf1abae7a099ca7ae86b4776ee00dbfe4edac Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 15 Feb 2024 17:16:20 -0800 Subject: [PATCH] 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 --- pcbnew/pcb_painter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index fc0d78313a..51f0d5e692 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -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;