Better prioritization for non-driven pin ERC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1881
This commit is contained in:
parent
af28634df1
commit
601a63b63a
|
@ -459,8 +459,15 @@ int ERC_TESTER::TestPinToPin()
|
||||||
{
|
{
|
||||||
ELECTRICAL_PINTYPE refType = refPin->GetType();
|
ELECTRICAL_PINTYPE refType = refPin->GetType();
|
||||||
|
|
||||||
if( !needsDriver && DrivenPinTypes.count( refType ) )
|
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
|
||||||
|
if( !needsDriver ||
|
||||||
|
( !needsDriver->IsVisible() && refPin->IsVisible() ) ||
|
||||||
|
( needsDriver->IsPowerConnection() && !refPin->IsPowerConnection() ) )
|
||||||
needsDriver = refPin;
|
needsDriver = refPin;
|
||||||
|
}
|
||||||
|
|
||||||
hasDriver |= DrivingPinTypes.count( refType );
|
hasDriver |= DrivingPinTypes.count( refType );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue