From 120dd654ef2ba3786b3acd6d0bba97b771d21f9d Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 15 Nov 2022 21:27:43 -0500 Subject: [PATCH] Apply inherit_properties to built-in fields Fixes https://gitlab.com/kicad/code/kicad/-/issues/12904 --- .../database/sch_database_plugin.cpp | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/eeschema/sch_plugins/database/sch_database_plugin.cpp b/eeschema/sch_plugins/database/sch_database_plugin.cpp index 8b4b703041..1e94f2aaba 100644 --- a/eeschema/sch_plugins/database/sch_database_plugin.cpp +++ b/eeschema/sch_plugins/database/sch_database_plugin.cpp @@ -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; }