Don't allow selection of footprint dimensions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15418
This commit is contained in:
Jeff Young 2023-08-15 17:06:42 +01:00
parent 686704bb31
commit 750b92b17f
1 changed files with 17 additions and 0 deletions

View File

@ -2690,6 +2690,23 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
break;
case PCB_DIM_ALIGNED_T:
case PCB_DIM_LEADER_T:
case PCB_DIM_CENTER_T:
case PCB_DIM_RADIAL_T:
case PCB_DIM_ORTHOGONAL_T:
if( aItem->GetParentFootprint() )
{
// Footprint dimension selections are only allowed in footprint editor mode.
if( !checkVisibilityOnly )
return false;
if( !board()->IsLayerVisible( aItem->GetLayer() ) )
return false;
}
break;
case PCB_PAD_T:
pad = static_cast<const PAD*>( aItem );