From c4143b0ff65ec6ff2757471cde4b2808cc434788 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 1 Mar 2022 17:26:41 +0000 Subject: [PATCH] Reconcile two different printing bug fixes. https://gitlab.com/kicad/code/kicad/-/commit/a9f092b3706d65ddcf1ecfb34ef1559877524862 https://gitlab.com/kicad/code/kicad/-/commit/6f5cb1f97d95ad893744cdcb47115ca0fb1db438 Fixes https://gitlab.com/kicad/code/kicad/issues/11004 --- pcbnew/fp_text.cpp | 5 ++--- pcbnew/pcbnew_printout.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pcbnew/fp_text.cpp b/pcbnew/fp_text.cpp index bdff832dff..566bde3cad 100644 --- a/pcbnew/fp_text.cpp +++ b/pcbnew/fp_text.cpp @@ -373,13 +373,12 @@ double FP_TEXT::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const return HIDE; RENDER_SETTINGS* renderSettings = aView->GetPainter()->GetSettings(); - COLOR4D backgroundColor = renderSettings->GetLayerColor( LAYER_PCB_BACKGROUND ); // Handle Render tab switches if( m_Type == TEXT_is_VALUE || GetText() == wxT( "${VALUE}" ) ) { if( !aView->IsLayerVisible( LAYER_MOD_VALUES ) - || renderSettings->GetLayerColor( LAYER_MOD_VALUES ) == backgroundColor ) + || renderSettings->GetLayerColor( LAYER_MOD_VALUES ) == COLOR4D::UNSPECIFIED ) { return HIDE; } @@ -388,7 +387,7 @@ double FP_TEXT::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const if( m_Type == TEXT_is_REFERENCE || GetText() == wxT( "${REFERENCE}" ) ) { if( !aView->IsLayerVisible( LAYER_MOD_REFERENCES ) - || renderSettings->GetLayerColor( LAYER_MOD_REFERENCES ) == backgroundColor ) + || renderSettings->GetLayerColor( LAYER_MOD_REFERENCES ) == COLOR4D::UNSPECIFIED ) { return HIDE; } diff --git a/pcbnew/pcbnew_printout.cpp b/pcbnew/pcbnew_printout.cpp index 657af6554a..d44485f35a 100644 --- a/pcbnew/pcbnew_printout.cpp +++ b/pcbnew/pcbnew_printout.cpp @@ -145,7 +145,7 @@ void PCBNEW_PRINTOUT::setupViewLayers( KIGFX::VIEW& aView, const LSET& aLayerSet RENDER_SETTINGS* renderSettings = aView.GetPainter()->GetSettings(); // A color to do not print objects on some layers, when the layer must be enabled // to print some other objects - COLOR4D invisible_color( 0.0, 0.0, 0.0, 0.0 ); + COLOR4D invisible_color = COLOR4D::UNSPECIFIED; if( m_pcbnewSettings.m_AsItemCheckboxes ) {