From 349ec2031bdb9649973af202999e9911a10b7687 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 26 Apr 2020 09:06:02 +0200 Subject: [PATCH] Eeschema plot worksheet: use the color defined in Eeschema settings. Fixes #4265 https://gitlab.com/kicad/code/kicad/issues/4265 --- eeschema/plot_schematic_DXF.cpp | 4 +++- eeschema/plot_schematic_PDF.cpp | 4 +++- eeschema/plot_schematic_PS.cpp | 4 +++- eeschema/plot_schematic_SVG.cpp | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/eeschema/plot_schematic_DXF.cpp b/eeschema/plot_schematic_DXF.cpp index 8f4079de13..211989e397 100644 --- a/eeschema/plot_schematic_DXF.cpp +++ b/eeschema/plot_schematic_DXF.cpp @@ -140,7 +140,9 @@ bool DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF( const wxString& aFileName, PlotWorkSheet( plotter, &m_parent->Prj(), m_parent->GetTitleBlock(), pageInfo, aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens, m_parent->GetScreenDesc(), aScreen->GetFileName(), - plotter->GetColorMode() ? COLOR4D::UNSPECIFIED : COLOR4D::BLACK ); + plotter->GetColorMode() ? + plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) : + COLOR4D::BLACK ); } aScreen->Plot( plotter ); diff --git a/eeschema/plot_schematic_PDF.cpp b/eeschema/plot_schematic_PDF.cpp index e07f18f931..fbbc6813ee 100644 --- a/eeschema/plot_schematic_PDF.cpp +++ b/eeschema/plot_schematic_PDF.cpp @@ -162,7 +162,9 @@ void DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF( PLOTTER* aPlotter, m_parent->GetPageSettings(), aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens, m_parent->GetScreenDesc(), aScreen->GetFileName(), - aPlotter->GetColorMode() ? COLOR4D::UNSPECIFIED : COLOR4D::BLACK ); + aPlotter->GetColorMode() ? + aPlotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) : + COLOR4D::BLACK ); } aScreen->Plot( aPlotter ); diff --git a/eeschema/plot_schematic_PS.cpp b/eeschema/plot_schematic_PS.cpp index b99cd0efdf..84b7101999 100644 --- a/eeschema/plot_schematic_PS.cpp +++ b/eeschema/plot_schematic_PS.cpp @@ -167,7 +167,9 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetPS( const wxString& aFileName, PlotWorkSheet( plotter, &aScreen->Prj(), m_parent->GetTitleBlock(), aPageInfo, aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens, m_parent->GetScreenDesc(), aScreen->GetFileName(), - plotter->GetColorMode() ? COLOR4D::UNSPECIFIED : COLOR4D::BLACK ); + plotter->GetColorMode() ? + plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) : + COLOR4D::BLACK ); } aScreen->Plot( plotter ); diff --git a/eeschema/plot_schematic_SVG.cpp b/eeschema/plot_schematic_SVG.cpp index 30fcd4dde5..e6c10cda4a 100644 --- a/eeschema/plot_schematic_SVG.cpp +++ b/eeschema/plot_schematic_SVG.cpp @@ -141,7 +141,9 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG( const wxString& aFileName, PlotWorkSheet( plotter, &aScreen->Prj(), m_parent->GetTitleBlock(), pageInfo, aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens, m_parent->GetScreenDesc(), aScreen->GetFileName(), - plotter->GetColorMode() ? COLOR4D::UNSPECIFIED : COLOR4D::BLACK ); + plotter->GetColorMode() ? + plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) : + COLOR4D::BLACK ); } aScreen->Plot( plotter );