diff --git a/pcbnew/dialog_SVG_print.cpp b/pcbnew/dialog_SVG_print.cpp index ab802fa033..80ecae05ae 100644 --- a/pcbnew/dialog_SVG_print.cpp +++ b/pcbnew/dialog_SVG_print.cpp @@ -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() ) diff --git a/pcbnew/plot_rtn.cpp b/pcbnew/plot_rtn.cpp index e7c318b5a3..e9801cd3c8 100644 --- a/pcbnew/plot_rtn.cpp +++ b/pcbnew/plot_rtn.cpp @@ -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();