Don't allow selection of footprint text in board editor.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17271
This commit is contained in:
Jeff Young 2024-03-12 21:29:55 +00:00
parent 628ec858a6
commit 25e181db5c
1 changed files with 5 additions and 0 deletions

View File

@ -2910,6 +2910,11 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
}
else if( aItem->GetParentFootprint() )
{
// Footprint text selections are only allowed in footprint editor mode.
// Careful, though: we also get here through the PCB_FIELD_T case.
if( aItem->Type() == PCB_TEXT_T && !checkVisibilityOnly )
return false;
if( !view()->IsVisible( text ) )
return false;