Disable locked in the FP Editor.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15089
This commit is contained in:
Jeff Young 2023-06-30 20:51:01 +01:00
parent 7ed5963b4f
commit eb8994fde5
1 changed files with 7 additions and 1 deletions

View File

@ -318,7 +318,13 @@ static struct BOARD_ITEM_DESC
propMgr.AddProperty( new PROPERTY_ENUM<BOARD_ITEM, PCB_LAYER_ID>( _HKI( "Layer" ),
&BOARD_ITEM::SetLayer, &BOARD_ITEM::GetLayer ) );
propMgr.AddProperty( new PROPERTY<BOARD_ITEM, bool>( _HKI( "Locked" ),
&BOARD_ITEM::SetLocked, &BOARD_ITEM::IsLocked ) );
&BOARD_ITEM::SetLocked, &BOARD_ITEM::IsLocked ) )
.SetAvailableFunc(
[=]( INSPECTABLE* aItem ) -> bool
{
BOARD_ITEM* item = dynamic_cast<BOARD_ITEM*>( aItem );
return item && item->GetBoard() && !item->GetBoard()->IsFootprintHolder();
} );
}
} _BOARD_ITEM_DESC;