From ee095a671113a5635f4a4cc70d1cecf2125b7eb3 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 12 May 2019 20:23:16 -0400 Subject: [PATCH] Make sure secondary drivers are followed-up on after absorption --- eeschema/connection_graph.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 32825cb3c5..54de0d9ed6 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -1107,6 +1107,10 @@ void CONNECTION_GRAPH::buildConnectionGraph() auto c = std::make_shared( possible_driver, aSubgraph->m_sheet ); c->SetName( static_cast( possible_driver )->GetName() ); + + if( c->Name( true ) == aSubgraph->m_driver_connection->Name( true ) ) + continue; + connections_to_check.push_back( c ); wxLogTrace( "CONN", "%lu (%s): Adding secondary pin %s", aSubgraph->m_code, @@ -1123,6 +1127,10 @@ void CONNECTION_GRAPH::buildConnectionGraph() auto c = std::make_shared( possible_driver, aSubgraph->m_sheet ); c->SetName( static_cast( possible_driver )->GetShownText() ); + + if( c->Name( true ) == aSubgraph->m_driver_connection->Name( true ) ) + continue; + connections_to_check.push_back( c ); wxLogTrace( "CONN", "%lu (%s): Adding secondary label %s", aSubgraph->m_code, @@ -1219,13 +1227,13 @@ void CONNECTION_GRAPH::buildConnectionGraph() { wxLogTrace( "CONN", "%lu (%s) absorbs neighbor %lu (%s)", subgraph->m_code, connection->Name(), - candidate->m_code, member->Name() ); - - // Candidate may have other non-chosen drivers we need to follow - add_connections_to_check( candidate ); + candidate->m_code, candidate->m_driver_connection->Name() ); subgraph->Absorb( candidate ); invalidated_subgraphs.insert( subgraph ); + + // Candidate may have other non-chosen drivers we need to follow + add_connections_to_check( subgraph ); } } }