Ignore multiple identical bus labels

Fixes: lp:1825560
* https://bugs.launchpad.net/kicad/+bug/1825560
This commit is contained in:
Jon Evans 2019-04-19 22:03:18 -04:00
parent f2d9887409
commit a92bb94612
1 changed files with 18 additions and 1 deletions

View File

@ -1594,8 +1594,25 @@ std::vector<CONNECTION_SUBGRAPH*> CONNECTION_GRAPH::GetBusesNeedingMigration()
if( !connection->IsBus() ) if( !connection->IsBus() )
continue; continue;
if( subgraph->GetBusLabels().size() > 1 ) auto labels = subgraph->GetBusLabels();
if( labels.size() > 1 )
{ {
bool different = false;
wxString first = static_cast<SCH_TEXT*>( labels.at( 0 ) )->GetText();
for( unsigned i = 1; i < labels.size(); ++i )
{
if( static_cast<SCH_TEXT*>( labels.at( i ) )->GetText() != first )
{
different = true;
break;
}
}
if( !different )
continue;
wxLogTrace( "CONN", "SG %ld (%s) has multiple bus labels", subgraph->m_code, wxLogTrace( "CONN", "SG %ld (%s) has multiple bus labels", subgraph->m_code,
connection->Name() ); connection->Name() );