Commit c6af2a79 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

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.
parent a543f99e
Loading
Loading
Loading
Loading
+4 −21
Original line number Diff line number Diff line
@@ -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
}


+3 −3
Original line number Diff line number Diff line
@@ -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()
};