Handle orientation when pasting footprint items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17518
This commit is contained in:
parent
ba4974749c
commit
94223ca794
|
@ -740,8 +740,8 @@ static void pasteFootprintItemsToFootprintEditor( FOOTPRINT* aClipFootprint, BOA
|
|||
|
||||
aClipFootprint->Pads().clear();
|
||||
|
||||
// Not all graphic items can be added to the current footprint:
|
||||
// mandatory fields are already existing in the current footprint.
|
||||
// Not all items can be added to the current footprint: mandatory fields are already existing
|
||||
// in the current footprint.
|
||||
//
|
||||
for( PCB_FIELD* field : aClipFootprint->Fields() )
|
||||
{
|
||||
|
@ -777,6 +777,9 @@ static void pasteFootprintItemsToFootprintEditor( FOOTPRINT* aClipFootprint, BOA
|
|||
text->SetTextAngle( text->GetTextAngle() + editorFootprint->GetOrientation() );
|
||||
}
|
||||
|
||||
item->Rotate( item->GetPosition(), -aClipFootprint->GetOrientation() );
|
||||
item->Rotate( item->GetPosition(), editorFootprint->GetOrientation() );
|
||||
|
||||
VECTOR2I pos = item->GetFPRelativePosition();
|
||||
item->SetParent( editorFootprint );
|
||||
item->SetFPRelativePosition( pos );
|
||||
|
|
Loading…
Reference in New Issue