From cfe588a853d55a30c596b9425d5668a8f92fb0ab Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 27 May 2019 11:23:40 -0400 Subject: [PATCH] Prevent unbalanced PTH pad labels from being hidden by drills Fixes: lp:1829067 * https://bugs.launchpad.net/kicad/+bug/1829067 (cherry picked from commit 5230f4565816daa22fcd5e09c2fc0957ba33228f) --- pcbnew/class_pad.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 7a07c4949b..cf057934e0 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -1337,12 +1337,24 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const else if( IsOnLayer( F_Cu ) ) { aLayers[aCount++] = LAYER_PAD_FR; - aLayers[aCount++] = LAYER_PAD_FR_NETNAMES; + + // Is this a PTH pad that has only front copper? If so, we need to also display the + // net name on the PTH netname layer so that it isn't blocked by the drill hole. + if( m_Attribute == PAD_ATTRIB_STANDARD ) + aLayers[aCount++] = LAYER_PADS_NETNAMES; + else + aLayers[aCount++] = LAYER_PAD_FR_NETNAMES; } else if( IsOnLayer( B_Cu ) ) { aLayers[aCount++] = LAYER_PAD_BK; - aLayers[aCount++] = LAYER_PAD_BK_NETNAMES; + + // Is this a PTH pad that has only back copper? If so, we need to also display the + // net name on the PTH netname layer so that it isn't blocked by the drill hole. + if( m_Attribute == PAD_ATTRIB_STANDARD ) + aLayers[aCount++] = LAYER_PADS_NETNAMES; + else + aLayers[aCount++] = LAYER_PAD_BK_NETNAMES; } // Check non-copper layers. This list should include all the layers that the