Set sheetpath for ERCE_MISSING_UNIT errors.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18445
This commit is contained in:
Jeff Young 2024-08-13 18:27:23 -06:00
parent 7e281eebdf
commit 22d37f6c34

View File

@ -561,6 +561,8 @@ int ERC_TESTER::TestMissingUnits()
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( aErrorCode );
ercItem->SetErrorMessage( msg );
ercItem->SetItems( unit );
ercItem->SetSheetSpecificPath( base_ref.GetSheetPath() );
ercItem->SetItemsSheetPaths( base_ref.GetSheetPath() );
SCH_MARKER* marker = new SCH_MARKER( ercItem, unit->GetPosition() );
base_ref.GetSheetPath().LastScreen()->Append( marker );