From 76ce4ec535ee45e1dc9d940a5599a8e19f8dc3e4 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 2 Sep 2025 09:10:10 -0700 Subject: [PATCH] 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 (cherry picked from commit 1f1f8699e08f41367f2f93fe2a3af6b39bd4577c) --- pcbnew/tools/align_distribute_tool.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/align_distribute_tool.cpp b/pcbnew/tools/align_distribute_tool.cpp index 1841b51f44..d11fdff1c6 100644 --- a/pcbnew/tools/align_distribute_tool.cpp +++ b/pcbnew/tools/align_distribute_tool.cpp @@ -150,6 +150,8 @@ size_t ALIGN_DISTRIBUTE_TOOL::GetSelections( std::vectorIsFootprintEditor() + || m_frame->GetPcbNewSettings()->m_AllowFreePads; for( EDA_ITEM* item : selection ) { @@ -192,7 +194,7 @@ size_t ALIGN_DISTRIBUTE_TOOL::GetSelections( std::vector( item ); - if( allPads && differentParents ) + if( boardItem->Type() == PCB_PAD_T && ( !allowFreePads || ( allPads && differentParents ) ) ) { FOOTPRINT* parentFp = boardItem->GetParentFootprint();