Pcbnew, exchange footprints: fix a bug that prevent the new footprint to be at the right place.

Fixes: lp:1838446
https://bugs.launchpad.net/kicad/+bug/1838446
This commit is contained in:
jean-pierre charras 2019-07-31 12:07:49 +02:00
parent 6ae718e4d6
commit 090073cc3b
1 changed files with 4 additions and 0 deletions

View File

@ -419,6 +419,10 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aSrc, MODULE* aDest, BOARD_COMMIT&
* when all modules are on board */
PlaceModule( aDest, nullptr, false );
// Copy full placement, locked flag and pad net names (when possible) but not local
// settings like clearances (use library values)
aDest->SetPosition( aSrc->GetPosition() );
if( aDest->GetLayer() != aSrc->GetLayer() )
aDest->Flip( aSrc->GetPosition() );