From 878a67ca6564502e97d09b476c754681667c8ddd Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 22 Jul 2023 10:52:49 +0200 Subject: [PATCH] BOARD_NETLIST_UPDATER: fix incorrect handling of new fields added to a Fp - the new field position/rotation is now the same as its footprint parent. - it is added to the view. --- pcbnew/netlist_reader/board_netlist_updater.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pcbnew/netlist_reader/board_netlist_updater.cpp b/pcbnew/netlist_reader/board_netlist_updater.cpp index 347f926207..4de1be6bf1 100644 --- a/pcbnew/netlist_reader/board_netlist_updater.cpp +++ b/pcbnew/netlist_reader/board_netlist_updater.cpp @@ -373,6 +373,17 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint, newField->SetVisible( false ); newField->SetLayer( aPcbFootprint->GetLayer() == F_Cu ? F_Fab : B_Fab ); newField->StyleFromSettings( m_frame->GetDesignSettings() ); + + // Give the relative position (0,0) in footprint + newField->SetPosition( aPcbFootprint->GetPosition() ); + // Give the footprint orientation + newField->Rotate( aPcbFootprint->GetPosition(), aPcbFootprint->GetOrientation() ); + + if( m_frame ) + { + auto view = m_frame->GetCanvas()->GetView(); + view->Add( newField ); + } } } }