Hide all related layers when footprint rendering is disabled.

This commit is contained in:
Maciej Suminski 2016-06-07 15:07:47 +02:00
parent 553899b79b
commit cef45c0297
2 changed files with 9 additions and 2 deletions

View File

@ -919,9 +919,14 @@ void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const
unsigned int MODULE::ViewGetLOD( int aLayer ) const
{
// Currently there is only one layer, so there is nothing to check
// if( aLayer == ITEM_GAL_LAYER( ANCHOR_VISIBLE ) )
int layer = ( m_Layer == F_Cu ) ? MOD_FR_VISIBLE :
( m_Layer == B_Cu ) ? MOD_BK_VISIBLE : ANCHOR_VISIBLE;
// Currently it is only for anchor layer
if( m_view->IsLayerVisible( ITEM_GAL_LAYER( layer ) ) )
return 30;
return std::numeric_limits<unsigned int>::max();
}

View File

@ -416,6 +416,7 @@ void PCB_DRAW_PANEL_GAL::setDefaultLayerDeps()
m_view->SetRequired( F_Mask, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) );
m_view->SetRequired( F_CrtYd, ITEM_GAL_LAYER( MOD_FR_VISIBLE ) );
m_view->SetRequired( F_Fab, ITEM_GAL_LAYER( MOD_FR_VISIBLE ) );
m_view->SetRequired( F_SilkS, ITEM_GAL_LAYER( MOD_FR_VISIBLE ) );
// Back modules
m_view->SetRequired( ITEM_GAL_LAYER( PAD_BK_VISIBLE ), ITEM_GAL_LAYER( MOD_BK_VISIBLE ) );
@ -426,6 +427,7 @@ void PCB_DRAW_PANEL_GAL::setDefaultLayerDeps()
m_view->SetRequired( B_Mask, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) );
m_view->SetRequired( B_CrtYd, ITEM_GAL_LAYER( MOD_BK_VISIBLE ) );
m_view->SetRequired( B_Fab, ITEM_GAL_LAYER( MOD_BK_VISIBLE ) );
m_view->SetRequired( B_SilkS, ITEM_GAL_LAYER( MOD_BK_VISIBLE ) );
m_view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KIGFX::TARGET_OVERLAY );
m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( GP_OVERLAY ) );