pcb: grab unconnected needs to ignore same-footprint ratsnets items

This commit is contained in:
Mike Williams 2024-05-28 14:43:54 -04:00
parent e853b593b1
commit 7ea205222d
1 changed files with 6 additions and 0 deletions

View File

@ -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();