mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 10:51:41 +00:00
Prevent ERC error with NC pin+NC marker
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20222
This commit is contained in:
parent
3f17aabcd0
commit
4f6a73d83c
@ -3640,6 +3640,16 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph
|
||||
return true;
|
||||
}
|
||||
|
||||
for( SCH_ITEM* item : screen->Items().Overlapping( SCH_SYMBOL_T, noConnectPos ) )
|
||||
{
|
||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||
|
||||
const SCH_PIN* test_pin = symbol->GetPin( noConnectPos );
|
||||
|
||||
if( test_pin && test_pin->GetType() == ELECTRICAL_PINTYPE::PT_NC )
|
||||
return true;
|
||||
}
|
||||
|
||||
if( unique_pins.size() > 1 && settings.IsTestEnabled( ERCE_NOCONNECT_CONNECTED ) )
|
||||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_NOCONNECT_CONNECTED );
|
||||
|
@ -1120,7 +1120,7 @@ const SCH_PIN* SCH_SYMBOL::GetPin( const VECTOR2I& aPos ) const
|
||||
if( pin_bodyStyle > 0 && pin_bodyStyle != GetBodyStyle() )
|
||||
continue;
|
||||
|
||||
if( pin->IsPointClickableAnchor( aPos ) )
|
||||
if( pin->GetPosition() == aPos )
|
||||
return pin.get();
|
||||
}
|
||||
|
||||
|
@ -1124,7 +1124,7 @@ OPT_TOOL_EVENT EE_SELECTION_TOOL::autostartEvent( TOOL_EVENT* aEvent, EE_GRID_HE
|
||||
const SCH_SYMBOL* symbol = static_cast<const SCH_SYMBOL*>( aItem );
|
||||
const SCH_PIN* pin = symbol->GetPin( pos );
|
||||
|
||||
if( !pin )
|
||||
if( !pin || !pin->IsPointClickableAnchor( pos ) )
|
||||
return OPT_TOOL_EVENT();
|
||||
|
||||
if( !pin->IsVisible()
|
||||
|
Loading…
Reference in New Issue
Block a user