Prevent unbalanced PTH pad labels from being hidden by drills

Fixes: lp:1829067
* https://bugs.launchpad.net/kicad/+bug/1829067

(cherry picked from commit 5230f45658)
This commit is contained in:
Jon Evans 2019-05-27 11:23:40 -04:00
parent db90e97d0b
commit cfe588a853
1 changed files with 14 additions and 2 deletions

View File

@ -1337,11 +1337,23 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
else if( IsOnLayer( F_Cu ) ) else if( IsOnLayer( F_Cu ) )
{ {
aLayers[aCount++] = LAYER_PAD_FR; aLayers[aCount++] = LAYER_PAD_FR;
// 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; aLayers[aCount++] = LAYER_PAD_FR_NETNAMES;
} }
else if( IsOnLayer( B_Cu ) ) else if( IsOnLayer( B_Cu ) )
{ {
aLayers[aCount++] = LAYER_PAD_BK; aLayers[aCount++] = LAYER_PAD_BK;
// 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; aLayers[aCount++] = LAYER_PAD_BK_NETNAMES;
} }