From 098102220e6a5bebf43a5b4dd49e783d419e629b Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 25 Apr 2019 15:31:44 -0400 Subject: [PATCH] Fix detection of lonely local labels --- eeschema/connection_graph.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 873becd2ab..bffaf2d14d 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -359,6 +359,8 @@ void CONNECTION_GRAPH::Reset() m_bus_name_to_code_map.clear(); m_net_code_to_subgraphs_map.clear(); m_net_name_to_subgraphs_map.clear(); + m_local_label_cache.clear(); + m_global_label_cache.clear(); m_last_net_code = 1; m_last_bus_code = 1; m_last_subgraph_code = 1; @@ -2061,7 +2063,9 @@ bool CONNECTION_GRAPH::ercCheckLabels( const CONNECTION_SUBGRAPH* aSubgraph, } else { - if( m_local_label_cache.count( std::make_pair( aSubgraph->m_sheet, name ) ) ) + auto pair = std::make_pair( aSubgraph->m_sheet, name ); + + if( m_local_label_cache.count( pair ) && m_local_label_cache.at( pair ).size() > 1 ) has_other_connections = true; } }