diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index 8c5a30994b..5a8809e30e 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -2963,7 +2963,21 @@ void FOOTPRINT::swapData( BOARD_ITEM* aImage ) { wxASSERT( aImage->Type() == PCB_FOOTPRINT_T ); - std::swap( *this, *static_cast( aImage ) ); + FOOTPRINT* image = static_cast( aImage ); + + std::swap( *this, *image ); + + RunOnChildren( + [&]( BOARD_ITEM* child ) + { + child->SetParent( this ); + } ); + + image->RunOnChildren( + [&]( BOARD_ITEM* child ) + { + child->SetParent( image ); + } ); } diff --git a/pcbnew/netlist_reader/board_netlist_updater.cpp b/pcbnew/netlist_reader/board_netlist_updater.cpp index a671e3f2af..8d107cade6 100644 --- a/pcbnew/netlist_reader/board_netlist_updater.cpp +++ b/pcbnew/netlist_reader/board_netlist_updater.cpp @@ -436,11 +436,7 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint, newField->Rotate( aPcbFootprint->GetPosition(), aPcbFootprint->GetOrientation() ); if( m_frame ) - { newField->StyleFromSettings( m_frame->GetDesignSettings() ); - KIGFX::PCB_VIEW* view = m_frame->GetCanvas()->GetView(); - view->Add( newField ); - } } }