Handle bitmap (reference image) selection correctly

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16522
This commit is contained in:
Roberto Fernandez Bautista 2024-01-05 00:20:02 +01:00
parent 0aec789659
commit 32cc486d89
1 changed files with 19 additions and 1 deletions

View File

@ -2578,9 +2578,27 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
break;
case PCB_BITMAP_T:
{
if( !board()->IsElementVisible( LAYER_DRAW_BITMAPS ) )
return false;
if( m_isFootprintEditor )
{
if( !view()->IsLayerVisible( aItem->GetLayer() ) )
return false;
}
else
{
if( !board()->IsLayerVisible( aItem->GetLayer() ) )
return false;
}
break;
}
case PCB_FP_SHAPE_T:
case PCB_FP_TEXTBOX_T:
case PCB_BITMAP_T:
if( m_isFootprintEditor )
{
if( !view()->IsLayerVisible( aItem->GetLayer() ) )