Fix grabbing connections from power components
This commit is contained in:
parent
04a51a5ba4
commit
e9b99cc8b7
|
@ -849,7 +849,12 @@ static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition )
|
||||||
comp = dynamic_cast<SCH_COMPONENT*>( item->GetParent() );
|
comp = dynamic_cast<SCH_COMPONENT*>( item->GetParent() );
|
||||||
|
|
||||||
if( comp && comp->GetPartRef() && comp->GetPartRef()->IsPower() )
|
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
|
else
|
||||||
conn = item->Connection( editFrame->GetCurrentSheet() );
|
conn = item->Connection( editFrame->GetCurrentSheet() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue