From 0bde79bd6c8cdba87d2ce83b5b8490d4f39e0fe2 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 3 Mar 2024 16:59:00 +0100 Subject: [PATCH] PCB_PAINTER: do not draw PCB_SHAPEs on netname layer in FP editor. Fixes #17250 https://gitlab.com/kicad/code/kicad/-/issues/17250 --- pcbnew/pcb_painter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index a1b0421b3e..8f64f19304 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2013-2019 CERN - * Copyright (C) 2021-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2021-2024 KiCad Developers, see AUTHORS.txt for contributors. * * @author Tomasz Wlostowski * @author Maciej Suminski @@ -1700,8 +1700,12 @@ void PCB_PAINTER::draw( const PCB_SHAPE* aShape, int aLayer ) int thickness = getLineThickness( aShape->GetWidth() ); LINE_STYLE lineStyle = aShape->GetStroke().GetLineStyle(); - if( IsNetnameLayer( aLayer ) && m_frameType == FRAME_T::FRAME_PCB_EDITOR ) + if( IsNetnameLayer( aLayer ) ) { + // Net names are shown only in board editor: + if( m_frameType != FRAME_T::FRAME_PCB_EDITOR ) + return; + if( !pcbconfig() || pcbconfig()->m_Display.m_NetNames < 2 ) return;