Check for unresolved fields in labels.

This commit is contained in:
Jeff Young 2024-06-26 14:54:45 +01:00
parent 0acc4dc286
commit c4f61c2eaf
1 changed files with 15 additions and 0 deletions

View File

@ -222,6 +222,21 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
} }
} }
} }
else if( SCH_LABEL_BASE* label = dynamic_cast<SCH_LABEL_BASE*>( item ) )
{
for( SCH_FIELD& field : label->GetFields() )
{
if( unresolved( field.GetShownText( &sheet, true ) ) )
{
auto 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 );
}
}
}
else if( item->Type() == SCH_SHEET_T ) else if( item->Type() == SCH_SHEET_T )
{ {
SCH_SHEET* subSheet = static_cast<SCH_SHEET*>( item ); SCH_SHEET* subSheet = static_cast<SCH_SHEET*>( item );