Fix grabbing connections from power components

This commit is contained in:
Jon Evans 2020-07-04 20:58:58 -04:00
parent 04a51a5ba4
commit e9b99cc8b7
1 changed files with 6 additions and 1 deletions

View File

@ -849,7 +849,12 @@ static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition )
comp = dynamic_cast<SCH_COMPONENT*>( item->GetParent() );
if( comp && comp->GetPartRef() && comp->GetPartRef()->IsPower() )
conn = comp->Connection( editFrame->GetCurrentSheet() );
{
SCH_PIN_PTRS pins = comp->GetSchPins( &editFrame->GetCurrentSheet() );
if( pins.size() == 1 )
conn = pins[0]->Connection( editFrame->GetCurrentSheet() );
}
else
conn = item->Connection( editFrame->GetCurrentSheet() );
}