Apply inherit_properties to built-in fields

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12904
This commit is contained in:
Jon Evans 2022-11-15 21:27:43 -05:00
parent 13f5c78e89
commit 120dd654ef
1 changed files with 14 additions and 6 deletions

View File

@ -374,19 +374,27 @@ LIB_SYMBOL* SCH_DATABASE_PLUGIN::loadSymbolFromRow( const wxString& aSymbolName,
{
LIB_FIELD& field = symbol->GetValueField();
field.SetText( value );
field.SetVisible( mapping.visible_on_add );
field.SetNameShown( mapping.show_name );
if( !mapping.inherit_properties )
{
field.SetVisible( mapping.visible_on_add );
field.SetNameShown( mapping.show_name );
}
continue;
}
else if( mapping.name == wxT( "Datasheet" ) )
{
LIB_FIELD& field = symbol->GetDatasheetField();
field.SetText( value );
field.SetVisible( mapping.visible_on_add );
field.SetNameShown( mapping.show_name );
if( mapping.visible_on_add )
field.SetAutoAdded( true );
if( !mapping.inherit_properties )
{
field.SetVisible( mapping.visible_on_add );
field.SetNameShown( mapping.show_name );
if( mapping.visible_on_add )
field.SetAutoAdded( true );
}
continue;
}