From a92bb946128772558f121275066497d543436ce3 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 19 Apr 2019 22:03:18 -0400 Subject: [PATCH] Ignore multiple identical bus labels Fixes: lp:1825560 * https://bugs.launchpad.net/kicad/+bug/1825560 --- eeschema/connection_graph.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 8f26fd76cc..a95f320404 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -1594,8 +1594,25 @@ std::vector CONNECTION_GRAPH::GetBusesNeedingMigration() if( !connection->IsBus() ) continue; - if( subgraph->GetBusLabels().size() > 1 ) + auto labels = subgraph->GetBusLabels(); + + if( labels.size() > 1 ) { + bool different = false; + wxString first = static_cast( labels.at( 0 ) )->GetText(); + + for( unsigned i = 1; i < labels.size(); ++i ) + { + if( static_cast( labels.at( i ) )->GetText() != first ) + { + different = true; + break; + } + } + + if( !different ) + continue; + wxLogTrace( "CONN", "SG %ld (%s) has multiple bus labels", subgraph->m_code, connection->Name() );