Fix ERC for nets with power input and input pins

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7264
This commit is contained in:
Jon Evans 2021-01-24 22:17:56 -05:00
parent d40fe127aa
commit 9f18fee124
1 changed files with 7 additions and 3 deletions

View File

@ -475,11 +475,15 @@ int ERC_TESTER::TestPinToPin()
if( DrivenPinTypes.count( refType ) )
{
// needsDriver will be the pin shown in the error report eventually, so try to
// upgrade to a "better" pin if possible: something visible and not a power symbol
// upgrade to a "better" pin if possible: something visible and only a power symbol
// if this net needs a power driver
if( !needsDriver ||
( !needsDriver->IsVisible() && refPin->IsVisible() ) ||
( needsDriver->IsPowerConnection() && !refPin->IsPowerConnection() ) )
( !needsDriver->IsVisible() && refPin->IsVisible() ) ||
( ispowerNet != needsDriver->IsPowerConnection() &&
ispowerNet == refPin->IsPowerConnection() ) )
{
needsDriver = refPin;
}
}
if( ispowerNet )