From 5acf60ec6cd8f6307de3be4192fae87f86222352 Mon Sep 17 00:00:00 2001 From: John Beard Date: Mon, 11 Nov 2024 23:21:56 +0800 Subject: [PATCH] Pcbnew: enable pad clearance again Now that we have padstacks, pads are no longer drawn on LAYER_PADS_SMD_FR/SMD_BK/TH layers, but rather the actual copper layers (c.f. PAD::ViewGetLayers() changes in 56e08115167897753c1076c16c908d46fe944a5d. Also enables the clearance display in the FP editor, as normally most FPs have clearances off, but when you do have them set, you want to be able to see where they end up. --- pcbnew/pcb_painter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 744cab9aef..7dd0c85497 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -1707,9 +1707,8 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer ) } } - if( pcbconfig() && pcbconfig()->m_Display.m_PadClearance - && ( aLayer == LAYER_PADS_SMD_FR || aLayer == LAYER_PADS_SMD_BK || aLayer == LAYER_PADS_TH ) - && !m_pcbSettings.m_isPrinting ) + if( ( ( pcbconfig() && pcbconfig()->m_Display.m_PadClearance ) || !pcbconfig() ) + && !m_pcbSettings.m_isPrinting ) { /* * Showing the clearance area is not obvious as the clearance extends from the pad on @@ -1719,7 +1718,8 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer ) */ PCB_LAYER_ID activeLayer = m_pcbSettings.GetActiveLayer(); - if( IsCopperLayer( activeLayer ) && board->GetVisibleLayers().test( activeLayer ) ) + if( activeLayer == aLayer && IsCopperLayer( activeLayer ) + && board->GetVisibleLayers().test( activeLayer ) ) { if( aPad->GetAttribute() == PAD_ATTRIB::NPTH ) color = m_pcbSettings.GetLayerColor( LAYER_NON_PLATEDHOLES );