Commit f24048e8 authored by Maciej Suminski's avatar Maciej Suminski

Drawing SMD pads with colors defined by "Pads Front"/"Pads Back" color settings.

parent 0a55a2b6
...@@ -98,9 +98,9 @@ const int m_galLayerOrder[] = ...@@ -98,9 +98,9 @@ const int m_galLayerOrder[] =
ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ), ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ), ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ),
ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ),
LAYER_N_FRONT, LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12, LAYER_N_11, ITEM_GAL_LAYER( PAD_FR_VISIBLE ), LAYER_N_FRONT, LAYER_N_15, LAYER_N_14, LAYER_N_13,
LAYER_N_10, LAYER_N_9, LAYER_N_8, LAYER_N_7, LAYER_N_6, LAYER_N_5, LAYER_N_4, LAYER_N_12, LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8, LAYER_N_7, LAYER_N_6,
LAYER_N_3, LAYER_N_2, LAYER_N_BACK, LAYER_N_5, LAYER_N_4, LAYER_N_3, LAYER_N_2, ITEM_GAL_LAYER( PAD_BK_VISIBLE ), LAYER_N_BACK,
SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK,
ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE )
......
...@@ -765,15 +765,26 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const ...@@ -765,15 +765,26 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
if( m_Attribute == PAD_SMD || m_Attribute == PAD_CONN) if( m_Attribute == PAD_SMD || m_Attribute == PAD_CONN)
{ {
// Single layer pad (smd) without hole // Single layer pad (smd) without hole
aLayers[0] = GetParent()->GetLayer(); if( IsOnLayer( LAYER_N_FRONT ) )
aCount = 1; aLayers[0] = ITEM_GAL_LAYER( PAD_FR_VISIBLE );
else if( IsOnLayer( LAYER_N_BACK ) )
aLayers[0] = ITEM_GAL_LAYER( PAD_BK_VISIBLE );
#ifdef __WXDEBUG__
else // Should not occur
{
wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD on layer different than FRONT/BACK") );
}
#endif
aCount = 1;
} }
else else
{ {
// Multi layer pad with hole - pad is shown on one common layer, hole on the other // Multi layer pad with hole - pad is shown on one common layer, hole on the other
aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE ); aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE );
aLayers[1] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ); aLayers[1] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE );
aCount = 2;
aCount = 2;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment