Don't select footprints on the wrong side if not visible.

Fixes https://gitlab.com/kicad/code/kicad/issues/12483
This commit is contained in:
Jeff Young 2022-10-04 13:21:24 +01:00
parent 201dcabb97
commit 524a43f95e
1 changed files with 4 additions and 0 deletions

View File

@ -2351,6 +2351,10 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
// Allow selection of footprints if some part of the footprint is visible.
const FOOTPRINT* footprint = static_cast<const FOOTPRINT*>( aItem );
LSET boardSide = footprint->IsFlipped() ? LSET::BackMask() : LSET::FrontMask();
if( !( visibleLayers() & boardSide ).any() && !m_skip_heuristics )
return false;
// If the footprint has no items except the reference and value fields, include the
// footprint in the selections.