Exclude hidden text from selection in FP Editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/11111
This commit is contained in:
Jeff Young 2022-03-12 23:28:34 +00:00
parent db0b733be5
commit 06c1bccccd
1 changed files with 6 additions and 0 deletions

View File

@ -2441,6 +2441,7 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
const ZONE* zone = nullptr;
const PCB_VIA* via = nullptr;
const PAD* pad = nullptr;
const FP_TEXT* text = nullptr;
switch( aItem->Type() )
{
@ -2499,6 +2500,11 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
case PCB_FP_TEXT_T:
if( m_isFootprintEditor )
{
text = static_cast<const FP_TEXT*>( aItem );
if( !text->IsVisible() && !view()->IsLayerVisible( LAYER_MOD_TEXT_INVISIBLE ) )
return false;
if( !view()->IsLayerVisible( aItem->GetLayer() ) )
return false;
}