Commit 0c02dc07 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: fixed 2 minor issues.

parent cd778c12
......@@ -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() )
......
......@@ -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();
......
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