Copy properties but not values of datasheet and footprint fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/6037
This commit is contained in:
parent
da5cfb5df1
commit
787bd5109e
|
@ -544,8 +544,24 @@ void SYMBOL_EDIT_FRAME::CreateNewPart()
|
||||||
|
|
||||||
*field = *parentField;
|
*field = *parentField;
|
||||||
|
|
||||||
if( id == VALUE )
|
switch( id )
|
||||||
|
{
|
||||||
|
case REFERENCE:
|
||||||
|
// parent's reference already copied
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VALUE:
|
||||||
field->SetText( name );
|
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 );
|
field->SetParent( &new_part );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue