Don't reparent symbol fields

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4540
This commit is contained in:
Jon Evans 2020-05-25 17:47:50 -04:00
parent 13baf548ca
commit 2164501b06
2 changed files with 3 additions and 4 deletions

View File

@ -568,7 +568,6 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnAddField( wxCommandEvent& event )
SCH_FIELD newField( wxPoint( 0, 0 ), fieldID, m_cmp,
TEMPLATE_FIELDNAME::GetDefaultFieldName( fieldID ) );
newField.SetParent( m_cmp->GetParent() );
newField.SetTextAngle( m_fields->at( REFERENCE ).GetTextAngle() );
newField.SetTextSize( wxSize( settings.m_DefaultTextSize, settings.m_DefaultTextSize ) );

View File

@ -195,12 +195,12 @@ bool SCH_SCREEN::HasItems( KICAD_T aItemType ) const
void SCH_SCREEN::Append( SCH_ITEM* aItem )
{
if( aItem->Type() != SCH_SHEET_PIN_T && aItem->Type() != SCH_FIELD_T )
{
// Ensure the item can reach the SCHEMATIC through this screen
aItem->SetParent( this );
if( aItem->Type() != SCH_SHEET_PIN_T && aItem->Type() != SCH_FIELD_T )
{
if( aItem->Type() == SCH_COMPONENT_T )
{
SCH_COMPONENT* symbol = static_cast<SCH_COMPONENT*>( aItem );