Commit aa6a5ab6 authored by Maciej Suminski's avatar Maciej Suminski

Moved bottom netnames layer over bottom tracks & pads. Changed int to LAYER_NUM where applicable.

parent fef47b0b
......@@ -254,7 +254,7 @@ enum PCB_VISIBLE
/// Rendering order of layers on GAL-based canvas (lower index in the array
/// means that layer is displayed closer to the user, ie. on the top).
const int GalLayerOrder[] =
const LAYER_NUM GalLayerOrder[] =
{
DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N,
UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31,
......@@ -282,8 +282,8 @@ const int GalLayerOrder[] =
ITEM_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4,
ITEM_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3,
ITEM_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2,
ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK,
ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ),
ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK,
SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK,
ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE )
......
......@@ -196,8 +196,10 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard )
}
// Set rendering order of layers
for( unsigned int i = 0; i < sizeof( GalLayerOrder ) / sizeof( int ); ++i )
for( LAYER_NUM i = 0; i < sizeof(GalLayerOrder) / sizeof(LAYER_NUM); ++i )
{
wxASSERT( i < KiGfx::VIEW::VIEW_MAX_LAYERS );
view->SetLayerOrder( GalLayerOrder[i], i );
}
......@@ -205,16 +207,16 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard )
// so there is no point in caching them
for( LAYER_NUM layer = FIRST_NETNAME_LAYER; layer <= LAST_NETNAME_LAYER; ++layer )
{
view->SetLayerCached( layer, false );
view->SetLayerCached( layer, false );
}
// Load layer & elements visibility settings
for( unsigned int i = 0; i < NB_LAYERS; ++i )
for( LAYER_NUM i = 0; i < NB_LAYERS; ++i )
{
view->SetLayerVisible( i, m_Pcb->IsLayerVisible( i ) );
}
for( unsigned int i = 0; i < END_PCB_VISIBLE_LIST; ++i )
for( LAYER_NUM i = 0; i < END_PCB_VISIBLE_LIST; ++i )
{
view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment