From 787bd5109e40dae80e588c9f95a94193f7c0fdb1 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 11 Nov 2020 17:33:53 +0000 Subject: [PATCH] Copy properties but not values of datasheet and footprint fields. Fixes https://gitlab.com/kicad/code/kicad/issues/6037 --- eeschema/symbol_editor/symbol_editor.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/eeschema/symbol_editor/symbol_editor.cpp b/eeschema/symbol_editor/symbol_editor.cpp index c6fe5edf3b..2541cc9242 100644 --- a/eeschema/symbol_editor/symbol_editor.cpp +++ b/eeschema/symbol_editor/symbol_editor.cpp @@ -544,8 +544,24 @@ void SYMBOL_EDIT_FRAME::CreateNewPart() *field = *parentField; - if( id == VALUE ) + switch( id ) + { + case REFERENCE: + // parent's reference already copied + break; + + case VALUE: field->SetText( name ); + break; + + case FOOTPRINT: + case DATASHEET: + // - footprint might be the same as parent, but might not + // - datasheet is most likely different + // - probably best to play it safe and copy neither + field->SetText( wxEmptyString ); + break; + } field->SetParent( &new_part ); }