Don't allow selection of footprint dimensions.

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

(cherry picked from commit 750b92b17f)
This commit is contained in:
Jeff Young 2023-08-15 17:06:42 +01:00
parent cf133975c1
commit 1ef90c898e
1 changed files with 17 additions and 0 deletions

View File

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