diff --git a/common/jobs/job_fp_export_svg.h b/common/jobs/job_fp_export_svg.h index 23194cce93..dc8071b2a9 100644 --- a/common/jobs/job_fp_export_svg.h +++ b/common/jobs/job_fp_export_svg.h @@ -32,6 +32,7 @@ class KICOMMON_API JOB_FP_EXPORT_SVG : public JOB public: JOB_FP_EXPORT_SVG(); +public: wxString m_libraryPath; wxString m_footprint; @@ -39,13 +40,14 @@ public: wxString m_colorTheme; - bool m_blackAndWhite; - bool m_sketchPadsOnFabLayers; - bool m_hideDNPFPsOnFabLayers; - bool m_sketchDNPFPsOnFabLayers; - bool m_crossoutDNPFPsOnFabLayers; + bool m_blackAndWhite; + bool m_sketchPadsOnFabLayers; + bool m_hideDNPFPsOnFabLayers; + bool m_sketchDNPFPsOnFabLayers; + bool m_crossoutDNPFPsOnFabLayers; - LSEQ m_printMaskLayer; + wxString m_argLayers; + LSEQ m_plotLayerSequence; }; #endif \ No newline at end of file diff --git a/pcbnew/pcb_plotter.cpp b/pcbnew/pcb_plotter.cpp index 2d2d0b203c..a988685e88 100644 --- a/pcbnew/pcb_plotter.cpp +++ b/pcbnew/pcb_plotter.cpp @@ -231,13 +231,15 @@ bool PCB_PLOTTER::Plot( const wxString& aOutputPath, } while( copperLayerShouldBeSkipped( nextLayer ) && ( nextI < layersToPlot.size() - 1 ) ); - wxString pageName = m_board->GetLayerName( nextLayer ); - wxString sheetName = layerName; + layerName = m_board->GetLayerName( nextLayer ); + + wxString pageName = layerName; + wxString sheetName = layerName; static_cast( plotter )->ClosePage(); static_cast( plotter )->StartPage( pageNumber, pageName ); - setupPlotterNewPDFPage( plotter, m_board, &m_plotOpts, sheetName, sheetPath, - pageNumber, finalPageCount ); + setupPlotterNewPDFPage( plotter, m_board, &m_plotOpts, layerName, sheetName, + sheetPath, pageNumber, finalPageCount ); } diff --git a/pcbnew/pcbnew_jobs_handler.cpp b/pcbnew/pcbnew_jobs_handler.cpp index 9e3805ea79..16340500ed 100644 --- a/pcbnew/pcbnew_jobs_handler.cpp +++ b/pcbnew/pcbnew_jobs_handler.cpp @@ -1851,7 +1851,7 @@ int PCBNEW_JOBS_HANDLER::doFpExportSvg( JOB_FP_EXPORT_SVG* aSvgJob, const FOOTPR svgPlotOptions.m_outputFile = outputFile.GetFullPath(); svgPlotOptions.m_mirror = false; svgPlotOptions.m_pageSizeMode = 2; // board bounding box - svgPlotOptions.m_printMaskLayer = aSvgJob->m_printMaskLayer; + svgPlotOptions.m_printMaskLayer = aSvgJob->m_plotLayerSequence; svgPlotOptions.m_sketchPadsOnFabLayers = aSvgJob->m_sketchPadsOnFabLayers; svgPlotOptions.m_hideDNPFPsOnFabLayers = aSvgJob->m_hideDNPFPsOnFabLayers; svgPlotOptions.m_sketchDNPFPsOnFabLayers = aSvgJob->m_sketchDNPFPsOnFabLayers; diff --git a/pcbnew/pcbplot.h b/pcbnew/pcbplot.h index 9d6edb14cc..3c81a73046 100644 --- a/pcbnew/pcbplot.h +++ b/pcbnew/pcbplot.h @@ -163,8 +163,9 @@ PLOTTER* StartPlotBoard( BOARD* aBoard, const PCB_PLOT_PARAMS* aPlotOpts, int aL const int aPageCount = 1); void setupPlotterNewPDFPage( PLOTTER* aPlotter, BOARD* aBoard, const PCB_PLOT_PARAMS* aPlotOpts, - const wxString& aSheetName, const wxString& aSheetPath, - const wxString& aPageNumber, int aPageCount ); + const wxString& aLayerName, const wxString& aSheetName, + const wxString& aSheetPath, const wxString& aPageNumber, + int aPageCount ); /** * Plot a sequence of board layer IDs. * diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index 1cb54a996e..ec10c723b0 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -1354,11 +1354,10 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, const PCB_PLOT_PARAMS *aPlotOpts, int aL return nullptr; } -void setupPlotterNewPDFPage( PLOTTER* aPlotter, - BOARD* aBoard, - const PCB_PLOT_PARAMS* aPlotOpts, - const wxString& aSheetName, const wxString& aSheetPath, - const wxString& aPageNumber, int aPageCount ) +void setupPlotterNewPDFPage( PLOTTER* aPlotter, BOARD* aBoard, const PCB_PLOT_PARAMS* aPlotOpts, + const wxString& aLayerName, const wxString& aSheetName, + const wxString& aSheetPath, const wxString& aPageNumber, + int aPageCount ) { // Plot the frame reference if requested if( aPlotOpts->GetPlotFrameRef() ) @@ -1372,4 +1371,6 @@ void setupPlotterNewPDFPage( PLOTTER* aPlotter, if( aPlotOpts->GetMirror() ) initializePlotter( aPlotter, aBoard, aPlotOpts ); } + + aPlotter->RenderSettings()->SetLayerName( aLayerName ); }