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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17271

(cherry picked from commit 25e181db5c)
This commit is contained in:
Jeff Young 2024-03-12 21:29:55 +00:00
parent 091b34c05f
commit f0e2adc3df
1 changed files with 5 additions and 0 deletions

View File

@ -2773,6 +2773,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;