diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 379cf45d4b..75540aaefd 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -1276,6 +1276,7 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const unsigned int D_PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const { const int HIDE = std::numeric_limits::max(); + BOARD* board = GetBoard(); // Handle Render tab switches if( ( GetAttribute() == PAD_ATTRIB_STANDARD || GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED ) @@ -1294,6 +1295,10 @@ unsigned int D_PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const if( IsBackLayer( ( PCB_LAYER_ID )aLayer ) && !aView->IsLayerVisible( LAYER_PAD_BK ) ) return HIDE; + // Only draw the pad if at least one of the layers it crosses is being displayed + if( board && !( board->GetVisibleLayers() & GetLayerSet() ).any() ) + return HIDE; + // Netnames will be shown only if zoom is appropriate if( IsNetnameLayer( aLayer ) ) { diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp index d9476fccc3..d4f7f2a7be 100644 --- a/pcbnew/pcb_draw_panel_gal.cpp +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -446,10 +446,12 @@ void PCB_DRAW_PANEL_GAL::setDefaultLayerDeps() m_view->SetRequired( LAYER_PADS_NETNAMES, LAYER_PADS_TH ); // Front modules + m_view->SetRequired( LAYER_PAD_FR, F_Cu ); m_view->SetRequired( LAYER_MOD_TEXT_FR, LAYER_MOD_FR ); m_view->SetRequired( LAYER_PAD_FR_NETNAMES, LAYER_PAD_FR ); // Back modules + m_view->SetRequired( LAYER_PAD_BK, B_Cu ); m_view->SetRequired( LAYER_MOD_TEXT_BK, LAYER_MOD_BK ); m_view->SetRequired( LAYER_PAD_BK_NETNAMES, LAYER_PAD_BK );