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
This commit is contained in:
Jeff Young 2021-12-13 18:22:10 +00:00
parent b4835c8208
commit 4c565fd222
1 changed files with 1 additions and 1 deletions

View File

@ -2460,7 +2460,7 @@ void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector
std::set<BOARD_ITEM*> 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] )