From eb8994fde51cca191dfc16eaf934eea97bb29ba3 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 30 Jun 2023 20:51:01 +0100 Subject: [PATCH] Disable locked in the FP Editor. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15089 --- pcbnew/board_item.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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;