Shows single layer pads with proper colors.

This commit is contained in:
Maciej Suminski 2013-06-21 12:02:17 +02:00
parent 145a3f20de
commit 26f6e259e6
1 changed files with 21 additions and 2 deletions

View File

@ -764,8 +764,27 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
} }
else else
{ {
// Multi layer pad with hole - pad is shown on one common layer, hole on the other if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) )
aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE ); {
// Multi layer pad
aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE );
}
else if( IsOnLayer( LAYER_N_FRONT ) )
{
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
// Draw a hole
aLayers[1] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ); aLayers[1] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE );
aCount = 2; aCount = 2;