From c0fb041be61043c7d72d3040e9e9dc4147d02a70 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 23 Dec 2022 20:50:49 -0500 Subject: [PATCH] No-connects might not be connected to a pin Fixes https://gitlab.com/kicad/code/kicad/-/issues/13256 (cherry picked from commit 5657ca5a0434202a93e5957e52778e9a07ddac81) --- eeschema/connection_graph.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 5bb42081a9..6a6191d455 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -2725,13 +2725,20 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph if( unique_pins.size() > 1 && settings.IsTestEnabled( ERCE_NOCONNECT_CONNECTED ) ) { std::shared_ptr ercItem = ERC_ITEM::Create( ERCE_NOCONNECT_CONNECTED ); + VECTOR2I pos; if( pin ) + { ercItem->SetItems( pin, aSubgraph->m_no_connect ); + pos = pin->GetTransformedPosition(); + } else + { ercItem->SetItems( aSubgraph->m_no_connect ); + pos = aSubgraph->m_no_connect->GetPosition(); + } - SCH_MARKER* marker = new SCH_MARKER( ercItem, pin->GetTransformedPosition() ); + SCH_MARKER* marker = new SCH_MARKER( ercItem, pos ); screen->Append( marker ); ok = false;