mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Prevent pads from moving inappropriately
Free pads is a setting unless we are in the footprint editor and needs to be respected by the alignmen tool Fixes https://gitlab.com/kicad/code/kicad/-/issues/21626
This commit is contained in:
parent
0ede830f54
commit
1f1f8699e0
@ -150,6 +150,8 @@ size_t ALIGN_DISTRIBUTE_TOOL::GetSelections( std::vector<std::pair<BOARD_ITEM*,
|
||||
bool allPads = true;
|
||||
BOARD_ITEM_CONTAINER* currentParent = nullptr;
|
||||
bool differentParents = false;
|
||||
bool allowFreePads = m_selectionTool->IsFootprintEditor()
|
||||
|| m_frame->GetPcbNewSettings()->m_AllowFreePads;
|
||||
|
||||
for( EDA_ITEM* item : selection )
|
||||
{
|
||||
@ -192,7 +194,7 @@ size_t ALIGN_DISTRIBUTE_TOOL::GetSelections( std::vector<std::pair<BOARD_ITEM*,
|
||||
|
||||
BOARD_ITEM* boardItem = static_cast<BOARD_ITEM*>( item );
|
||||
|
||||
if( allPads && differentParents )
|
||||
if( boardItem->Type() == PCB_PAD_T && ( !allowFreePads || ( allPads && differentParents ) ) )
|
||||
{
|
||||
FOOTPRINT* parentFp = boardItem->GetParentFootprint();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user