From 7db48b81b6229514a05059d44c9ec9920e8e77bf Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 9 Jan 2024 13:14:13 -0500 Subject: [PATCH] Second attempt at fixing ERC dialog reference update issue. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16519 (cherry picked from commit 4f3fb5c23f4e80470a6f528578bdb406cb106eb6) --- eeschema/connection_graph.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 540595c8ea..34e9ec714d 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -3274,6 +3274,7 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph { std::shared_ptr ercItem = ERC_ITEM::Create( ERCE_NOCONNECT_CONNECTED ); ercItem->SetSheetSpecificPath( sheet ); + ercItem->SetItemsSheetPaths( sheet ); VECTOR2I pos; @@ -3297,8 +3298,9 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph if( unique_pins.empty() && unique_labels.empty() && settings.IsTestEnabled( ERCE_NOCONNECT_NOT_CONNECTED ) ) { std::shared_ptr ercItem = ERC_ITEM::Create( ERCE_NOCONNECT_NOT_CONNECTED ); - ercItem->SetSheetSpecificPath( sheet ); ercItem->SetItems( aSubgraph->m_no_connect ); + ercItem->SetSheetSpecificPath( sheet ); + ercItem->SetItemsSheetPaths( sheet ); SCH_MARKER* marker = new SCH_MARKER( ercItem, aSubgraph->m_no_connect->GetPosition() ); screen->Append( marker ); @@ -3388,6 +3390,7 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph { std::shared_ptr ercItem = ERC_ITEM::Create( ERCE_PIN_NOT_CONNECTED ); ercItem->SetSheetSpecificPath( sheet ); + ercItem->SetItemsSheetPaths( sheet ); ercItem->SetItems( pin ); SCH_MARKER* marker = new SCH_MARKER( ercItem, pin->GetTransformedPosition() ); @@ -3412,6 +3415,7 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph { std::shared_ptr ercItem = ERC_ITEM::Create( ERCE_PIN_NOT_CONNECTED ); ercItem->SetSheetSpecificPath( sheet ); + ercItem->SetItemsSheetPaths( sheet ); ercItem->SetItems( testPin ); SCH_MARKER* marker = new SCH_MARKER( ercItem, @@ -3643,6 +3647,7 @@ int CONNECTION_GRAPH::ercCheckHierSheets() std::shared_ptr ercItem = ERC_ITEM::Create( ERCE_PIN_NOT_CONNECTED ); ercItem->SetItems( pin ); ercItem->SetSheetSpecificPath( sheet ); + ercItem->SetItemsSheetPaths( sheet ); SCH_MARKER* marker = new SCH_MARKER( ercItem, pin->GetPosition() ); sheet.LastScreen()->Append( marker );