Copy properties but not values of datasheet and footprint fields.

Fixes https://gitlab.com/kicad/code/kicad/issues/6037
This commit is contained in:
Jeff Young 2020-11-11 17:33:53 +00:00
parent da5cfb5df1
commit 787bd5109e
1 changed files with 17 additions and 1 deletions

View File

@ -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 );
}