mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-15 02:33:15 +02:00
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();
|
aClipFootprint->Pads().clear();
|
||||||
|
|
||||||
// Not all graphic items can be added to the current footprint:
|
// Not all items can be added to the current footprint: mandatory fields are already existing
|
||||||
// mandatory fields are already existing in the current footprint.
|
// in the current footprint.
|
||||||
//
|
//
|
||||||
for( PCB_FIELD* field : aClipFootprint->Fields() )
|
for( PCB_FIELD* field : aClipFootprint->Fields() )
|
||||||
{
|
{
|
||||||
@ -777,6 +777,9 @@ static void pasteFootprintItemsToFootprintEditor( FOOTPRINT* aClipFootprint, BOA
|
|||||||
text->SetTextAngle( text->GetTextAngle() + editorFootprint->GetOrientation() );
|
text->SetTextAngle( text->GetTextAngle() + editorFootprint->GetOrientation() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
item->Rotate( item->GetPosition(), -aClipFootprint->GetOrientation() );
|
||||||
|
item->Rotate( item->GetPosition(), editorFootprint->GetOrientation() );
|
||||||
|
|
||||||
VECTOR2I pos = item->GetFPRelativePosition();
|
VECTOR2I pos = item->GetFPRelativePosition();
|
||||||
item->SetParent( editorFootprint );
|
item->SetParent( editorFootprint );
|
||||||
item->SetFPRelativePosition( pos );
|
item->SetFPRelativePosition( pos );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user