Pcbnew: fixed 2 minor issues.

This commit is contained in:
jean-pierre charras 2010-09-24 18:36:20 +02:00
parent cd778c125e
commit 0c02dc0754
2 changed files with 10 additions and 4 deletions

View File

@ -219,8 +219,10 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref )
fn.SetName( fn.GetName() + wxT( "-brd" ) );
else
{
fn.SetName( fn.GetName() + wxT( "-" ) +
m_BoxSelectLayer[layer]->GetLabel() );
wxString extraname = m_BoxSelectLayer[layer]->GetLabel();
extraname.Trim(); // remove leading and trailing spaces if any
extraname.Trim(false);
fn.SetName( fn.GetName() + wxT( "-" ) + extraname );
m_PrintMaskLayer = 1 << layer;
if( m_PrintBoardEdgesCtrl->IsChecked() )

View File

@ -65,14 +65,18 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( PLOTTER* plotter,
Plot_Edges_Modules( plotter, m_Pcb, masque_layer, trace_mode );
/* Plot pads (creates pads outlines, for pads on silkscreen layers) */
if( g_pcb_plot_options.PlotPadsOnSilkLayer )
bool layersmask_plotpads = masque_layer;
// Calculate the mask layers of allowed layers for pads
if( !g_pcb_plot_options.PlotPadsOnSilkLayer )
layersmask_plotpads &= ~(SILKSCREEN_LAYER_BACK || SILKSCREEN_LAYER_FRONT);
if( layersmask_plotpads )
{
for( MODULE* Module = m_Pcb->m_Modules; Module; Module = Module->Next() )
{
for( D_PAD * pad = Module->m_Pads; pad != NULL; pad = pad->Next() )
{
/* See if the pad is on this layer */
if( (pad->m_Masque_Layer & masque_layer) == 0 )
if( (pad->m_Masque_Layer & layersmask_plotpads) == 0 )
continue;
wxPoint shape_pos = pad->ReturnShapePos();