Commit f24bc87a authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: fix Bug #1289416 (Broken setting of layer list in D_PAD:: ViewGetLayers() for GAL).

parent 63401f3d
...@@ -842,29 +842,40 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const ...@@ -842,29 +842,40 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
// Multi layer pad // Multi layer pad
aLayers[aCount++] = ITEM_GAL_LAYER( PADS_VISIBLE ); aLayers[aCount++] = ITEM_GAL_LAYER( PADS_VISIBLE );
aLayers[aCount++] = NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ); aLayers[aCount++] = NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE );
aLayers[aCount++] = SOLDERMASK_N_FRONT;
aLayers[aCount++] = SOLDERMASK_N_BACK;
aLayers[aCount++] = SOLDERPASTE_N_FRONT;
aLayers[aCount++] = SOLDERPASTE_N_BACK;
} }
else if( IsOnLayer( LAYER_N_FRONT ) ) else if( IsOnLayer( LAYER_N_FRONT ) )
{ {
aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE );
aLayers[aCount++] = NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ); aLayers[aCount++] = NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE );
aLayers[aCount++] = SOLDERMASK_N_FRONT;
aLayers[aCount++] = SOLDERPASTE_N_FRONT;
} }
else if( IsOnLayer( LAYER_N_BACK ) ) else if( IsOnLayer( LAYER_N_BACK ) )
{ {
aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE );
aLayers[aCount++] = NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ); aLayers[aCount++] = NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE );
}
if( IsOnLayer( SOLDERMASK_N_FRONT ) )
aLayers[aCount++] = SOLDERMASK_N_FRONT;
if( IsOnLayer( SOLDERMASK_N_BACK ) )
aLayers[aCount++] = SOLDERMASK_N_BACK; aLayers[aCount++] = SOLDERMASK_N_BACK;
if( IsOnLayer( SOLDERPASTE_N_FRONT ) )
aLayers[aCount++] = SOLDERPASTE_N_FRONT;
if( IsOnLayer( SOLDERPASTE_N_BACK ) )
aLayers[aCount++] = SOLDERPASTE_N_BACK; aLayers[aCount++] = SOLDERPASTE_N_BACK;
}
if( IsOnLayer( ADHESIVE_N_BACK ) )
aLayers[aCount++] = ADHESIVE_N_BACK;
if( IsOnLayer( ADHESIVE_N_FRONT ) )
aLayers[aCount++] = ADHESIVE_N_FRONT;
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
else // Should not occur if( aCount == 0 ) // Should not occur
{ {
wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD on layer different than FRONT/BACK") ); wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD has no layer") );
} }
#endif #endif
} }
......
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