Allow aligning pads in FP editor when locked

Locking is not a concept in the footprint editor.  The signature for
checking is slightly different in the alignment tool, so we need to move
the check higher to allow aligning items in fpeditor
This commit is contained in:
Seth Hillbrand 2021-06-29 16:46:25 -07:00
parent c6e4dcbecf
commit 0d8f0d361e
1 changed files with 3 additions and 3 deletions

View File

@ -161,12 +161,12 @@ size_t ALIGN_DISTRIBUTE_TOOL::GetSelections( ALIGNMENT_RECTS& aItemsToAlign,
{
BOARD_ITEM* boardItem = static_cast<BOARD_ITEM*>( item );
if( boardItem->IsLocked() )
// We do not lock items in the footprint editor
if( boardItem->IsLocked() && m_frame->IsType( FRAME_PCB_EDITOR ) )
{
// Locking a pad but not the footprint means that we align the footprint using
// the pad position. So we test for footprint locking here
if( m_frame->IsType( FRAME_PCB_EDITOR ) && boardItem->Type() == PCB_PAD_T
&& !boardItem->GetParent()->IsLocked() )
if( boardItem->Type() == PCB_PAD_T && !boardItem->GetParent()->IsLocked() )
{
itemsToAlign.push_back( boardItem );
}