From f2abf0832adcb746764252746fc23147fed307fd Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 9 Sep 2022 13:39:55 +0100 Subject: [PATCH] Filter pins by unit. Fixes https://gitlab.com/kicad/code/kicad/issues/12076 --- eeschema/tools/ee_selection_tool.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index 0ed06e70ac..3dee1fa515 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -1298,6 +1298,15 @@ bool EE_SELECTION_TOOL::selectMultiple() sch_item->RunOnChildren( [&]( SCH_ITEM* aChild ) { + // Filter pins by unit + if( SCH_PIN* pin = dyn_cast( aChild ) ) + { + int unit = pin->GetLibPin()->GetUnit(); + + if( unit && unit != pin->GetParentSymbol()->GetUnit() ) + return; + } + nearbyChildren.push_back( aChild ); } ); }