From 99427a86cd01aad0f212e19d8348b789f43d90e4 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 30 Jun 2014 20:14:06 +0200 Subject: [PATCH] Fix a double minor bug about layers occupied by SMD pads and CONN pad: The default layer stack between these 2 types was swaped in pad definition, and also in the dialog pad properties. This double swap creates no bug, but creates bugs in the footprint wizards (SMD or CONN pads do not have the right layer stack) FYI, the CONN pad type should be removed soon. --- pcbnew/class_pad.cpp | 25 ++++-------------------- pcbnew/dialogs/dialog_pad_properties.cpp | 6 +++--- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index c47f5844ce..99baa92dfc 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -93,17 +93,17 @@ LSET D_PAD::StandardMask() } -LSET D_PAD::ConnMask() +LSET D_PAD::SMDMask() { - // was: #define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT + // was: #define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT static LSET saved( 3, F_Cu, F_Paste, F_Mask ); return saved; } -LSET D_PAD::SMDMask() +LSET D_PAD::ConnMask() { - // was: #define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT + // was: #define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT static LSET saved( 2, F_Cu, F_Mask ); return saved; } @@ -348,22 +348,6 @@ const wxString D_PAD::GetPadName() const void D_PAD::StringPadName( wxString& text ) const { -#if 0 // m_Padname is not ASCII and not UTF8, it is LATIN1 basically, whatever - // 8 bit font is supported in KiCad plotting and drawing. - - // Return pad name as wxString, assume it starts as a non-terminated - // utf8 character sequence - - char temp[sizeof(m_Padname)+1]; // a place to terminate with '\0' - - strncpy( temp, m_Padname, sizeof(m_Padname) ); - - temp[sizeof(m_Padname)] = 0; - - text = FROM_UTF8( temp ); - -#else - text.Empty(); for( int ii = 0; ii < PADNAMEZ && m_Padname[ii]; ii++ ) @@ -371,7 +355,6 @@ void D_PAD::StringPadName( wxString& text ) const // m_Padname is 8 bit KiCad font junk, do not sign extend text.Append( (unsigned char) m_Padname[ii] ); } -#endif } diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index f1db6bf28c..ea26681a7c 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -72,12 +72,12 @@ static const LSET std_pad_layers[] = { // PAD_STANDARD: D_PAD::StandardMask(), - // PAD_CONN: - D_PAD::ConnMask(), - // PAD_SMD: D_PAD::SMDMask(), + // PAD_CONN: + D_PAD::ConnMask(), + // PAD_HOLE_NOT_PLATED: D_PAD::UnplatedHoleMask() };