From 0d8f0d361edb12289ca8974a7cfb27369e79ed21 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 29 Jun 2021 16:46:25 -0700 Subject: [PATCH] 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 --- pcbnew/tools/placement_tool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/tools/placement_tool.cpp b/pcbnew/tools/placement_tool.cpp index b3454cc2b0..0664f1248e 100644 --- a/pcbnew/tools/placement_tool.cpp +++ b/pcbnew/tools/placement_tool.cpp @@ -161,12 +161,12 @@ size_t ALIGN_DISTRIBUTE_TOOL::GetSelections( ALIGNMENT_RECTS& aItemsToAlign, { BOARD_ITEM* boardItem = static_cast( 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 ); }