mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-18 16:09:18 +00:00
Pcbnew: Disable locking of free-edited pads
This is confusing because the pads don't get a locked item shadow, so it's hard to see what is inhibiting a footprint move if a pad got locked. Rather than implement the shadow, disable pad locking in pcbnew (no locking exists in FP editor). Pad lock state isn't persisted to the board file, so it's not a fully supported action, and it's unlikely to be actively useful. Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18862
This commit is contained in:
parent
33484a8d1f
commit
e85ababab7
pcbnew
@ -2463,6 +2463,7 @@ static struct PAD_DESC
|
||||
propMgr.InheritsAfter( TYPE_HASH( PAD ), TYPE_HASH( BOARD_CONNECTED_ITEM ) );
|
||||
|
||||
propMgr.Mask( TYPE_HASH( PAD ), TYPE_HASH( BOARD_CONNECTED_ITEM ), _HKI( "Layer" ) );
|
||||
propMgr.Mask( TYPE_HASH( PAD ), TYPE_HASH( BOARD_ITEM ), _HKI( "Locked" ) );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<PAD, double>( _HKI( "Orientation" ),
|
||||
&PAD::SetOrientationDegrees, &PAD::GetOrientationDegrees,
|
||||
|
@ -1272,8 +1272,14 @@ int BOARD_EDITOR_CONTROL::modifyLockSelected( MODIFY_MODE aMode )
|
||||
if( !item->IsBOARD_ITEM() )
|
||||
continue;
|
||||
|
||||
BOARD_ITEM* board_item = static_cast<BOARD_ITEM*>( item );
|
||||
PCB_GROUP* parent_group = board_item->GetParentGroup();
|
||||
BOARD_ITEM* const board_item = static_cast<BOARD_ITEM*>( item );
|
||||
|
||||
// Disallow locking free pads - it's confusing and not persisted
|
||||
// through save/load anyway.
|
||||
if( board_item->Type() == PCB_PAD_T )
|
||||
continue;
|
||||
|
||||
PCB_GROUP* parent_group = board_item->GetParentGroup();
|
||||
|
||||
if( parent_group && parent_group->Type() == PCB_GENERATOR_T )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user