Fix sheet path dependent ERC dialog selection issues.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16519
(cherry picked from commit 92c58f2564
)
This commit is contained in:
parent
ace6439758
commit
f0ce3167c0
|
@ -3642,6 +3642,7 @@ int CONNECTION_GRAPH::ercCheckHierSheets()
|
|||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_PIN_NOT_CONNECTED );
|
||||
ercItem->SetItems( pin );
|
||||
ercItem->SetSheetSpecificPath( sheet );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, pin->GetPosition() );
|
||||
sheet.LastScreen()->Append( marker );
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -215,6 +215,7 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
|||
std::shared_ptr<ERC_ITEM> ercItem =
|
||||
ERC_ITEM::Create( ERCE_UNRESOLVED_VARIABLE );
|
||||
ercItem->SetItems( &field );
|
||||
ercItem->SetSheetSpecificPath( sheet );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, pos );
|
||||
screen->Append( marker );
|
||||
|
@ -232,6 +233,7 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
|||
std::shared_ptr<ERC_ITEM> ercItem =
|
||||
ERC_ITEM::Create( ERCE_UNRESOLVED_VARIABLE );
|
||||
ercItem->SetItems( &field );
|
||||
ercItem->SetSheetSpecificPath( sheet );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, field.GetPosition() );
|
||||
screen->Append( marker );
|
||||
|
@ -245,6 +247,7 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
|||
std::shared_ptr<ERC_ITEM> ercItem =
|
||||
ERC_ITEM::Create( ERCE_UNRESOLVED_VARIABLE );
|
||||
ercItem->SetItems( pin );
|
||||
ercItem->SetSheetSpecificPath( sheet );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, pin->GetPosition() );
|
||||
screen->Append( marker );
|
||||
|
@ -258,6 +261,7 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
|||
std::shared_ptr<ERC_ITEM> ercItem =
|
||||
ERC_ITEM::Create( ERCE_UNRESOLVED_VARIABLE );
|
||||
ercItem->SetItems( text );
|
||||
ercItem->SetSheetSpecificPath( sheet );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, text->GetPosition() );
|
||||
screen->Append( marker );
|
||||
|
@ -270,6 +274,7 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
|||
std::shared_ptr<ERC_ITEM> ercItem =
|
||||
ERC_ITEM::Create( ERCE_UNRESOLVED_VARIABLE );
|
||||
ercItem->SetItems( textBox );
|
||||
ercItem->SetSheetSpecificPath( sheet );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, textBox->GetPosition() );
|
||||
screen->Append( marker );
|
||||
|
@ -285,6 +290,7 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
|||
{
|
||||
std::shared_ptr<ERC_ITEM> erc = ERC_ITEM::Create( ERCE_UNRESOLVED_VARIABLE );
|
||||
erc->SetErrorMessage( _( "Unresolved text variable in drawing sheet" ) );
|
||||
erc->SetSheetSpecificPath( sheet );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( erc, text->GetPosition() );
|
||||
screen->Append( marker );
|
||||
|
@ -580,6 +586,7 @@ int ERC_TESTER::TestNoConnectPins()
|
|||
pair.second.size() > 2 ? pair.second[2] : nullptr,
|
||||
pair.second.size() > 3 ? pair.second[3] : nullptr );
|
||||
ercItem->SetErrorMessage( _( "Pins with 'no connection' type are connected" ) );
|
||||
ercItem->SetSheetSpecificPath( sheet );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, pair.first );
|
||||
sheet.LastScreen()->Append( marker );
|
||||
|
|
Loading…
Reference in New Issue