From f4525875f1f5f5223fd3b1b55930bc0ec642742e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 7 Jun 2016 10:02:19 +0200 Subject: [PATCH] Pcbnew: fix bug : footprint editor: shape offset was ignored when placing new pads. Was also ignored in global pad change in fp editor and board editor. --- pcbnew/globaleditpad.cpp | 1 - pcbnew/pad_edition_functions.cpp | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/globaleditpad.cpp b/pcbnew/globaleditpad.cpp index 3f5cfb504b..1640444f2e 100644 --- a/pcbnew/globaleditpad.cpp +++ b/pcbnew/globaleditpad.cpp @@ -369,7 +369,6 @@ void PCB_BASE_FRAME::GlobalChange_PadSettings( D_PAD* aPad, case PAD_ATTRIB_SMD: case PAD_ATTRIB_CONN: pad->SetDrillSize( wxSize( 0, 0 ) ); - pad->SetOffset( wxPoint( 0, 0 ) ); break; default: diff --git a/pcbnew/pad_edition_functions.cpp b/pcbnew/pad_edition_functions.cpp index b7621a5b3c..a892f92354 100644 --- a/pcbnew/pad_edition_functions.cpp +++ b/pcbnew/pad_edition_functions.cpp @@ -62,6 +62,7 @@ void PCB_BASE_FRAME::Export_Pad_Settings( D_PAD* aPad ) /* Imports the board design settings to aPad * - The position, names, and keys are not modifed. + * The parameters are expected to be correct (i.e. settings are valid) */ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw ) { @@ -104,8 +105,9 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw ) { case PAD_ATTRIB_SMD: case PAD_ATTRIB_CONN: + // These pads do not have hole (they are expected to be only on one + // external copper layer) aPad->SetDrillSize( wxSize( 0, 0 ) ); - aPad->SetOffset( wxPoint( 0, 0 ) ); break; default: