diff --git a/pcbnew/board_item.cpp b/pcbnew/board_item.cpp index 8e53d22146..e5847355b2 100644 --- a/pcbnew/board_item.cpp +++ b/pcbnew/board_item.cpp @@ -318,7 +318,13 @@ static struct BOARD_ITEM_DESC propMgr.AddProperty( new PROPERTY_ENUM( _HKI( "Layer" ), &BOARD_ITEM::SetLayer, &BOARD_ITEM::GetLayer ) ); propMgr.AddProperty( new PROPERTY( _HKI( "Locked" ), - &BOARD_ITEM::SetLocked, &BOARD_ITEM::IsLocked ) ); + &BOARD_ITEM::SetLocked, &BOARD_ITEM::IsLocked ) ) + .SetAvailableFunc( + [=]( INSPECTABLE* aItem ) -> bool + { + BOARD_ITEM* item = dynamic_cast( aItem ); + return item && item->GetBoard() && !item->GetBoard()->IsFootprintHolder(); + } ); } } _BOARD_ITEM_DESC;