Re-add keyword mapping
This commit is contained in:
parent
3e3ed0f3ee
commit
dbd498f451
|
@ -87,6 +87,9 @@ DATABASE_LIB_SETTINGS::DATABASE_LIB_SETTINGS( const std::string& aFilename ) :
|
||||||
pj["footprint_filters"].get<std::string>();
|
pj["footprint_filters"].get<std::string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( pj.contains( "keywords" ) )
|
||||||
|
table.properties.keywords = pj["keywords"].get<std::string>();
|
||||||
|
|
||||||
if( pj.contains( "exclude_from_bom" ) )
|
if( pj.contains( "exclude_from_bom" ) )
|
||||||
{
|
{
|
||||||
table.properties.exclude_from_bom =
|
table.properties.exclude_from_bom =
|
||||||
|
|
|
@ -317,6 +317,13 @@ LIB_SYMBOL* SCH_DATABASE_PLUGIN::loadSymbolFromRow( const wxString& aSymbolName,
|
||||||
symbol->SetDescription( value );
|
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()
|
if( !aTable.properties.footprint_filters.empty()
|
||||||
&& aRow.count( aTable.properties.footprint_filters ) )
|
&& aRow.count( aTable.properties.footprint_filters ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,6 +56,7 @@ struct MAPPABLE_SYMBOL_PROPERTIES
|
||||||
{
|
{
|
||||||
std::string description;
|
std::string description;
|
||||||
std::string footprint_filters;
|
std::string footprint_filters;
|
||||||
|
std::string keywords;
|
||||||
std::string exclude_from_bom;
|
std::string exclude_from_bom;
|
||||||
std::string exclude_from_board;
|
std::string exclude_from_board;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue