Fix alignment tool with locked footprints
This commit is contained in:
parent
721155165d
commit
51f02ecc51
|
@ -162,7 +162,19 @@ size_t ALIGN_DISTRIBUTE_TOOL::GetSelections( ALIGNMENT_RECTS& aItemsToAlign,
|
|||
BOARD_ITEM* boardItem = static_cast<BOARD_ITEM*>( item );
|
||||
|
||||
if( boardItem->IsLocked() )
|
||||
{
|
||||
// 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() )
|
||||
{
|
||||
itemsToAlign.push_back( boardItem );
|
||||
}
|
||||
else
|
||||
{
|
||||
lockedItems.push_back( boardItem );
|
||||
}
|
||||
}
|
||||
else
|
||||
itemsToAlign.push_back( boardItem );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue