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
This commit is contained in:
Seth Hillbrand 2023-10-23 12:52:52 -07:00
parent 6c91a3022e
commit 1380feef72
1 changed files with 3 additions and 3 deletions

View File

@ -3133,7 +3133,7 @@ bool CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts( const CONNECTION_SUBGRAPH
bus_name = bus_wire->Connection( &sheet )->Name(); bus_name = bus_wire->Connection( &sheet )->Name();
std::set<wxString> test_names; std::set<wxString> test_names;
test_names.insert( bus_entry->Connection( &sheet )->Name() ); test_names.insert( bus_entry->Connection( &sheet )->FullLocalName() );
wxString baseName = sheet.PathHumanReadable(); wxString baseName = sheet.PathHumanReadable();
@ -3146,11 +3146,11 @@ bool CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts( const CONNECTION_SUBGRAPH
{ {
for( const auto& sub_member : member->Members() ) for( const auto& sub_member : member->Members() )
{ {
if( test_names.count( sub_member->Name() ) ) if( test_names.count( sub_member->FullLocalName() ) )
conflict = false; conflict = false;
} }
} }
else if( test_names.count( member->Name() ) ) else if( test_names.count( member->FullLocalName() ) )
{ {
conflict = false; conflict = false;
} }