Re-add keyword mapping

This commit is contained in:
Jon Evans 2022-11-09 20:50:01 -05:00
parent 3e3ed0f3ee
commit dbd498f451
3 changed files with 11 additions and 0 deletions

View File

@ -87,6 +87,9 @@ DATABASE_LIB_SETTINGS::DATABASE_LIB_SETTINGS( const std::string& aFilename ) :
pj["footprint_filters"].get<std::string>();
}
if( pj.contains( "keywords" ) )
table.properties.keywords = pj["keywords"].get<std::string>();
if( pj.contains( "exclude_from_bom" ) )
{
table.properties.exclude_from_bom =

View File

@ -317,6 +317,13 @@ LIB_SYMBOL* SCH_DATABASE_PLUGIN::loadSymbolFromRow( const wxString& aSymbolName,
symbol->SetDescription( value );
}
if( !aTable.properties.keywords.empty() && aRow.count( aTable.properties.keywords ) )
{
wxString value( std::any_cast<std::string>( aRow.at( aTable.properties.keywords ) ).c_str(),
wxConvUTF8 );
symbol->SetKeyWords( value );
}
if( !aTable.properties.footprint_filters.empty()
&& aRow.count( aTable.properties.footprint_filters ) )
{

View File

@ -56,6 +56,7 @@ struct MAPPABLE_SYMBOL_PROPERTIES
{
std::string description;
std::string footprint_filters;
std::string keywords;
std::string exclude_from_bom;
std::string exclude_from_board;
};