From 50b182574dcb5b0247db083ab152df82f1a769e3 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 24 Aug 2020 21:59:43 +0100 Subject: [PATCH] Missing change from last commit. --- pcbnew/tools/selection_tool.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 96c6046108..6daa7a611b 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -1770,13 +1770,8 @@ bool SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibilityOn for( unsigned int layer : activeLayers ) { - if( aItem->Type() == PCB_PAD_T - && static_cast( aItem )->IsPadOnLayer( layer ) ) - { - onActiveLayer = true; - break; - } - else if( aItem->IsOnLayer( ToLAYER_ID( layer ) ) ) + // NOTE: Only checking the regular layers (not GAL meta-layers) + if( layer < PCB_LAYER_ID_COUNT && aItem->IsOnLayer( ToLAYER_ID( layer ) ) ) { onActiveLayer = true; break;