Browse Source

Do not draw pads on hidden copper layers.

pull/5/merge
Andrzej Wolski 8 years ago
committed by Wayne Stambaugh
parent
commit
370232f70d
  1. 5
      pcbnew/class_pad.cpp
  2. 2
      pcbnew/pcb_draw_panel_gal.cpp

5
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<unsigned int>::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 ) )
{

2
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 );

Loading…
Cancel
Save