From 7ea205222dfdc6f130412f7cd9b26c7fd133c175 Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Tue, 28 May 2024 14:43:54 -0400 Subject: [PATCH] pcb: grab unconnected needs to ignore same-footprint ratsnets items --- pcbnew/tools/pcb_selection_tool.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index 6194b68b6c..edfc3fa613 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -1741,6 +1741,12 @@ int PCB_SELECTION_TOOL::grabUnconnected( const TOOL_EVENT& aEvent ) // Check every ratsnest line for the nearest one for( const CN_EDGE& edge : edges ) { + if( edge.GetSourceNode()->Parent()->GetParentFootprint() + == edge.GetTargetNode()->Parent()->GetParentFootprint() ) + { + continue; // This edge is a loop on the same footprint + } + // Figure out if we are the source or the target node on the ratnest const CN_ANCHOR* other = edge.GetSourceNode()->Parent() == pad ? edge.GetTargetNode().get() : edge.GetSourceNode().get();