From 5cab66fb18c47eceb5e064df9373d43c707dc3f8 Mon Sep 17 00:00:00 2001 From: Roberto Fernandez Bautista Date: Wed, 29 Mar 2023 20:44:36 +0200 Subject: [PATCH] CADSTAR PCB importer: Fix incorrect position of overridden pads (cherry picked from commit 89441d807d4ecbc0901a40abc1d24fe14601cbda) --- pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp index 8287c02dc7..62cc66f9a1 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp @@ -1700,6 +1700,10 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadComponents() PADEXCEPTION& padEx = padPair.second; COMPONENT_PAD csPad = fpLibEntry.ComponentPads.at( padPair.first ); + // Reset the pad to be around 0,0 + csPad.Position -= fpLibEntry.Origin; + csPad.Position += m_designCenter; + if( !padEx.PadCode.IsEmpty() ) csPad.PadCodeID = padEx.PadCode;