From c1ee3953032c3f8e52202f1b4a07bcd7775ffd5b Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 12 Apr 2019 09:25:26 -0400 Subject: [PATCH] Don't propagate secondary connections with the same name --- eeschema/connection_graph.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index c7d1d6c76e..5f76091db9 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -1122,6 +1122,23 @@ void CONNECTION_GRAPH::buildConnectionGraph() wxString name = subgraph->GetNameForDriver( obj ); + // Non-power pins should not propagate to neighbors + if( obj->Type() == SCH_PIN_T ) + { + if( static_cast( obj )->IsPowerConnection() ) + { + if( name == connection->Name() ) + continue; + } + else + { + continue; + } + } + + wxLogTrace( "CONN", "Promoting neighbors of %lu (%s) secondary driver %s", + subgraph->m_code, connection->Name(), name ); + // If the name is a global, we'll have it in the code map if( m_net_name_to_code_map.count( name ) ) @@ -1136,6 +1153,9 @@ void CONNECTION_GRAPH::buildConnectionGraph() if( conn->IsBus() || conn->NetCode() != code ) continue; + wxLogTrace( "CONN", "Promoting %lu (%s) to %s", + subgraph_to_update->m_code, conn->Name(), name ); + for( auto item : subgraph_to_update->m_items ) { auto item_conn = item->Connection( subsheet ); @@ -1153,6 +1173,9 @@ void CONNECTION_GRAPH::buildConnectionGraph() if( sg->m_driver_connection->Name() == connection->Name() ) continue; + wxLogTrace( "CONN", "Promoting %lu (%s) to %s", + sg->m_code, sg->m_driver_connection->Name(), connection->Name() ); + // Neighbors had better be on the same sheet wxASSERT( sg->m_sheet == sheet );