From 8cbad7a3c0eaa2eae0b4a9a715cbe5f3781287d1 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 23 Oct 2023 12:52:52 -0700 Subject: [PATCH] Compare bus local names When running ERC, we want to check if bus members exist in the bus and this should be done using m_local_name (i.e. the name it take from the parent bus) not the resolved name as this will change depending on connections (cherry picked from commit 1380feef72f6955130e918a4b1339972d38d5a9b) --- eeschema/connection_graph.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index dcd58b804b..38b296f569 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -3174,7 +3174,7 @@ bool CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts( const CONNECTION_SUBGRAPH bus_name = bus_wire->Connection( &sheet )->Name(); std::set test_names; - test_names.insert( bus_entry->Connection( &sheet )->Name() ); + test_names.insert( bus_entry->Connection( &sheet )->FullLocalName() ); wxString baseName = sheet.PathHumanReadable(); @@ -3187,11 +3187,11 @@ bool CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts( const CONNECTION_SUBGRAPH { for( const auto& sub_member : member->Members() ) { - if( test_names.count( sub_member->Name() ) ) + if( test_names.count( sub_member->FullLocalName() ) ) conflict = false; } } - else if( test_names.count( member->Name() ) ) + else if( test_names.count( member->FullLocalName() ) ) { conflict = false; }