Filter pins by unit.

Fixes https://gitlab.com/kicad/code/kicad/issues/12076
This commit is contained in:
Jeff Young 2022-09-09 13:39:55 +01:00
parent f179754118
commit f2abf0832a
1 changed files with 9 additions and 0 deletions

View File

@ -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<SCH_PIN*>( aChild ) )
{
int unit = pin->GetLibPin()->GetUnit();
if( unit && unit != pin->GetParentSymbol()->GetUnit() )
return;
}
nearbyChildren.push_back( aChild );
} );
}