Reconcile two different printing bug fixes.

a9f092b370
6f5cb1f97d

Fixes https://gitlab.com/kicad/code/kicad/issues/11004

(cherry picked from commit c4143b0ff6)
This commit is contained in:
Jeff Young 2022-03-01 17:26:41 +00:00
parent 6fd898d1b3
commit 0ea559e3b8
2 changed files with 3 additions and 4 deletions

View File

@ -378,13 +378,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;
}
@ -393,7 +392,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;
}

View File

@ -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 )
{