diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 2415d91c1e..880240aac8 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -647,7 +647,10 @@ void CONNECTION_GRAPH::updateItemConnectivity( const SCH_SHEET_PATH& aSheet, for( const auto& it : connection_map ) { - const std::vector& connection_vec = it.second; + std::vector connection_vec = it.second; + std::sort( connection_vec.begin(), connection_vec.end() ); + connection_vec.erase( std::unique( connection_vec.begin(), connection_vec.end() ), + connection_vec.end() ); // Pre-scan to see if we have a bus at this location SCH_LINE* busLine = aSheet.LastScreen()->GetBus( it.first );