From 12215647f14c6c5e6e0b5523519602d6c5dffdd1 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 20 Jan 2023 19:08:39 +0000 Subject: [PATCH] Handler blind/buried/micro via drawing when all layers are hidden. Fixes https://gitlab.com/kicad/code/kicad/issues/13607 --- pcbnew/pcb_painter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 57f0f7c46a..4e6c8db556 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -411,6 +411,16 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons } } } + else if( originalLayer == LAYER_VIA_BBLIND || originalLayer == LAYER_VIA_MICROVIA ) + { + const PCB_VIA* via = static_cast( item ); + const BOARD* board = via->GetBoard(); + LSET visibleLayers = board->GetVisibleLayers() & board->GetEnabledLayers(); + + // Target graphic is visible if the via crosses a visible layer + if( ( via->GetLayerSet() & visibleLayers ).none() ) + color = COLOR4D::CLEAR; + } // Apply per-type opacity overrides if( item->Type() == PCB_TRACE_T || item->Type() == PCB_ARC_T )