Fix flagging power pin in ERC check

IsPowerConnection() is too restrictive a check

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8881
This commit is contained in:
Jon Evans 2021-08-21 11:19:09 -04:00
parent 71b7816de5
commit 4da0c897bc
1 changed files with 2 additions and 2 deletions

View File

@ -486,8 +486,8 @@ int ERC_TESTER::TestPinToPin()
// if this net needs a power driver
if( !needsDriver ||
( !needsDriver->IsVisible() && refPin->IsVisible() ) ||
( ispowerNet != needsDriver->IsPowerConnection() &&
ispowerNet == refPin->IsPowerConnection() ) )
( ispowerNet != ( needsDriver->GetType() == ELECTRICAL_PINTYPE::PT_POWER_IN ) &&
ispowerNet == ( refType == ELECTRICAL_PINTYPE::PT_POWER_IN ) ) )
{
needsDriver = refPin;
}