From 4c565fd22245e9af0f9bd47a69d01013f1d55e3a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 13 Dec 2021 18:22:10 +0000 Subject: [PATCH] Top layers includes a whole bunch of layers... ... and the first isn't particularly meaningful. Use GetActiveLayer instead. Fixes https://gitlab.com/kicad/code/kicad/issues/9972 --- pcbnew/tools/pcb_selection_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index 049c02edd1..86a3770ec9 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -2460,7 +2460,7 @@ void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector std::set rejected; wxPoint where( aWhere.x, aWhere.y ); - PCB_LAYER_ID activeLayer = (PCB_LAYER_ID) view()->GetTopLayer(); + PCB_LAYER_ID activeLayer = m_frame->GetActiveLayer(); LSET silkLayers( 2, B_SilkS, F_SilkS ); if( silkLayers[activeLayer] )