From b2bf3229e6ffe666c84681bec83619446b34c642 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 14 Apr 2023 10:42:02 +0200 Subject: [PATCH] BOARD::Move(): o not move twice PCB_SHAPES in footprints. Altium importer: fix incorrect position of imported PCB_TEXTs in footprints. --- pcbnew/board.cpp | 3 ++- pcbnew/plugins/altium/altium_pcb.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index 0ea6e13a0e..f28d21bdd7 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -412,7 +412,8 @@ void BOARD::Move( const VECTOR2I& aMoveVector ) // overload // aMoveVector was snapshotted, don't need "data". // Only move the top level group - if( brdItem->GetParentGroup() == nullptr ) + if( brdItem->GetParentGroup() == nullptr + && brdItem->GetParentFootprint() == nullptr ) brdItem->Move( aMoveVector ); return INSPECT_RESULT::CONTINUE; diff --git a/pcbnew/plugins/altium/altium_pcb.cpp b/pcbnew/plugins/altium/altium_pcb.cpp index e3d72b8668..cdc6c74146 100644 --- a/pcbnew/plugins/altium/altium_pcb.cpp +++ b/pcbnew/plugins/altium/altium_pcb.cpp @@ -3107,9 +3107,9 @@ void ALTIUM_PCB::ConvertTexts6ToFootprintItemOnLayer( FOOTPRINT* aFootprint, con else fpText->SetText( aElem.text ); - fpText->SetKeepUpright( false ); + fpText->SetKeepUpright( true ); fpText->SetLayer( aLayer ); - fpText->SetFPRelativePosition( aElem.position ); + fpText->SetPosition( aElem.position ); fpText->SetTextAngle( EDA_ANGLE( aElem.rotation, DEGREES_T ) ); ConvertTexts6ToEdaTextSettings( aElem, fpText );