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
56e0811516.

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.
This commit is contained in:
John Beard
2024-11-11 23:21:56 +08:00
parent 6cc5d89838
commit 5acf60ec6c
+4 -4
View File
@@ -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 );