From 820690d024224514f42137a0215dfee1ffdf9ab1 Mon Sep 17 00:00:00 2001 From: Fabien Corona Date: Sat, 4 Jan 2020 20:59:49 +0000 Subject: [PATCH] pcbnew : fix selection color for the 'hole' part of NPTHs The inner circles of NPTHs now change color when selected Fixes #1860 --- pcbnew/pcb_painter.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 8eaeb36dd0..afae54520a 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -717,16 +717,10 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) COLOR4D color; // Pad holes color is type specific - if( aLayer == LAYER_PADS_PLATEDHOLES || aLayer == LAYER_NON_PLATEDHOLES ) + // Hole color is the background color for plated holes, but only if the pad size is greater than the hole size. + // ( Don't let pads that *should* be NPTH get lost ) + if( ( aLayer == LAYER_PADS_PLATEDHOLES ) && !aPad->PadShouldBeNPTH() ) { - // Hole color is the background color for plated holes, but a specific color - // for not plated holes (LAYER_NON_PLATEDHOLES color layer ) - if( aPad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED ) - color = m_pcbSettings.GetColor( nullptr, LAYER_NON_PLATEDHOLES ); - // Don't let pads that *should* be NPTH get lost - else if( aPad->PadShouldBeNPTH() ) - color = m_pcbSettings.GetColor( aPad, aLayer ); - else color = m_pcbSettings.GetBackgroundColor(); } else