ADDED 2 new vars: EXCLUDE_FROM_BOM and EXCLUDE_FROM_BOARD.

This commit is contained in:
Jeff Young 2022-09-13 13:45:59 +01:00
parent fc74de81fb
commit ef05069ebc
1 changed files with 12 additions and 0 deletions

View File

@ -1026,6 +1026,8 @@ void SCH_SYMBOL::GetContextualTextVars( wxArrayString* aVars ) const
aVars->push_back( wxT( "SYMBOL_NAME" ) ); aVars->push_back( wxT( "SYMBOL_NAME" ) );
aVars->push_back( wxT( "SYMBOL_DESCRIPTION" ) ); aVars->push_back( wxT( "SYMBOL_DESCRIPTION" ) );
aVars->push_back( wxT( "SYMBOL_KEYWORDS" ) ); aVars->push_back( wxT( "SYMBOL_KEYWORDS" ) );
aVars->push_back( wxT( "EXCLUDE_FROM_BOM" ) );
aVars->push_back( wxT( "EXCLUDE_FROM_BOARD" ) );
} }
@ -1128,6 +1130,16 @@ bool SCH_SYMBOL::ResolveTextVar( wxString* token, int aDepth ) const
*token = GetKeyWords(); *token = GetKeyWords();
return true; return true;
} }
else if( token->IsSameAs( wxT( "EXCLUDE_FROM_BOM" ) ) )
{
* token = this->GetIncludeInBom() ? wxT( "" ) : _( "Excluded from BOM" );
return true;
}
else if( token->IsSameAs( wxT( "EXCLUDE_FROM_BOARD" ) ) )
{
* token = this->GetIncludeOnBoard() ? wxT( "" ) : _( "Excluded from board" );
return true;
}
return false; return false;
} }