Moved GalLayersOrder from layers_id_colors_and_visibility.h to PCB_BASE_FRAME.
This commit is contained in:
parent
fd973478dd
commit
eb784536af
|
@ -256,45 +256,6 @@ enum PCB_VISIBLE
|
||||||
/// number of *all* layers including PCB and item layers
|
/// number of *all* layers including PCB and item layers
|
||||||
#define TOTAL_LAYER_COUNT 128 //(NB_LAYERS + END_PCB_VISIBLE_LIST)
|
#define TOTAL_LAYER_COUNT 128 //(NB_LAYERS + END_PCB_VISIBLE_LIST)
|
||||||
|
|
||||||
/// 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 LAYER_NUM GalLayerOrder[] =
|
|
||||||
{
|
|
||||||
ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( SELECTION ),
|
|
||||||
ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ),
|
|
||||||
DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N,
|
|
||||||
UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31,
|
|
||||||
ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ),
|
|
||||||
ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ),
|
|
||||||
|
|
||||||
ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ),
|
|
||||||
ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ),
|
|
||||||
|
|
||||||
ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), SOLDERMASK_N_FRONT,
|
|
||||||
ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT,
|
|
||||||
SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT,
|
|
||||||
ITEM_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15,
|
|
||||||
ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14,
|
|
||||||
ITEM_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13,
|
|
||||||
ITEM_GAL_LAYER( LAYER_12_NETNAMES_VISIBLE ), LAYER_N_12,
|
|
||||||
ITEM_GAL_LAYER( LAYER_11_NETNAMES_VISIBLE ), LAYER_N_11,
|
|
||||||
ITEM_GAL_LAYER( LAYER_10_NETNAMES_VISIBLE ), LAYER_N_10,
|
|
||||||
ITEM_GAL_LAYER( LAYER_9_NETNAMES_VISIBLE ), LAYER_N_9,
|
|
||||||
ITEM_GAL_LAYER( LAYER_8_NETNAMES_VISIBLE ), LAYER_N_8,
|
|
||||||
ITEM_GAL_LAYER( LAYER_7_NETNAMES_VISIBLE ), LAYER_N_7,
|
|
||||||
ITEM_GAL_LAYER( LAYER_6_NETNAMES_VISIBLE ), LAYER_N_6,
|
|
||||||
ITEM_GAL_LAYER( LAYER_5_NETNAMES_VISIBLE ), LAYER_N_5,
|
|
||||||
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( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), SOLDERMASK_N_BACK,
|
|
||||||
ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK,
|
|
||||||
|
|
||||||
ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK,
|
|
||||||
ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ),
|
|
||||||
ITEM_GAL_LAYER( WORKSHEET )
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function IsValidLayer
|
* Function IsValidLayer
|
||||||
* tests whether a given integer is a valid layer index, i.e. can
|
* tests whether a given integer is a valid layer index, i.e. can
|
||||||
|
|
|
@ -115,6 +115,8 @@ protected:
|
||||||
MODULE* loadFootprint( const FPID& aFootprintId )
|
MODULE* loadFootprint( const FPID& aFootprintId )
|
||||||
throw( IO_ERROR, PARSE_ERROR );
|
throw( IO_ERROR, PARSE_ERROR );
|
||||||
|
|
||||||
|
static const LAYER_NUM GAL_LAYER_ORDER[];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType,
|
PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType,
|
||||||
const wxString& aTitle,
|
const wxString& aTitle,
|
||||||
|
|
|
@ -70,6 +70,44 @@ static const wxString DisplayModuleTextEntry( wxT( "DiModTx" ) );
|
||||||
static const wxString FastGrid1Entry( wxT( "FastGrid1" ) );
|
static const wxString FastGrid1Entry( wxT( "FastGrid1" ) );
|
||||||
static const wxString FastGrid2Entry( wxT( "FastGrid2" ) );
|
static const wxString FastGrid2Entry( wxT( "FastGrid2" ) );
|
||||||
|
|
||||||
|
/// 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 LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] =
|
||||||
|
{
|
||||||
|
ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( SELECTION ),
|
||||||
|
ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ),
|
||||||
|
DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N,
|
||||||
|
UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31,
|
||||||
|
ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ),
|
||||||
|
ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ),
|
||||||
|
|
||||||
|
ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ),
|
||||||
|
ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ),
|
||||||
|
|
||||||
|
ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), SOLDERMASK_N_FRONT,
|
||||||
|
ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT,
|
||||||
|
SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT,
|
||||||
|
ITEM_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15,
|
||||||
|
ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14,
|
||||||
|
ITEM_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13,
|
||||||
|
ITEM_GAL_LAYER( LAYER_12_NETNAMES_VISIBLE ), LAYER_N_12,
|
||||||
|
ITEM_GAL_LAYER( LAYER_11_NETNAMES_VISIBLE ), LAYER_N_11,
|
||||||
|
ITEM_GAL_LAYER( LAYER_10_NETNAMES_VISIBLE ), LAYER_N_10,
|
||||||
|
ITEM_GAL_LAYER( LAYER_9_NETNAMES_VISIBLE ), LAYER_N_9,
|
||||||
|
ITEM_GAL_LAYER( LAYER_8_NETNAMES_VISIBLE ), LAYER_N_8,
|
||||||
|
ITEM_GAL_LAYER( LAYER_7_NETNAMES_VISIBLE ), LAYER_N_7,
|
||||||
|
ITEM_GAL_LAYER( LAYER_6_NETNAMES_VISIBLE ), LAYER_N_6,
|
||||||
|
ITEM_GAL_LAYER( LAYER_5_NETNAMES_VISIBLE ), LAYER_N_5,
|
||||||
|
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( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), SOLDERMASK_N_BACK,
|
||||||
|
ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK,
|
||||||
|
|
||||||
|
ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK,
|
||||||
|
ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ),
|
||||||
|
ITEM_GAL_LAYER( WORKSHEET )
|
||||||
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME )
|
BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME )
|
||||||
EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END,
|
EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END,
|
||||||
|
@ -833,9 +871,9 @@ void PCB_BASE_FRAME::LoadSettings()
|
||||||
KiGfx::VIEW* view = m_galCanvas->GetView();
|
KiGfx::VIEW* view = m_galCanvas->GetView();
|
||||||
|
|
||||||
// Set rendering order and properties of layers
|
// Set rendering order and properties of layers
|
||||||
for( LAYER_NUM i = 0; (unsigned) i < sizeof(GalLayerOrder) / sizeof(LAYER_NUM); ++i )
|
for( LAYER_NUM i = 0; (unsigned) i < sizeof(GAL_LAYER_ORDER) / sizeof(LAYER_NUM); ++i )
|
||||||
{
|
{
|
||||||
LAYER_NUM layer = GalLayerOrder[i];
|
LAYER_NUM layer = GAL_LAYER_ORDER[i];
|
||||||
wxASSERT( layer < KiGfx::VIEW::VIEW_MAX_LAYERS );
|
wxASSERT( layer < KiGfx::VIEW::VIEW_MAX_LAYERS );
|
||||||
|
|
||||||
view->SetLayerOrder( layer, i );
|
view->SetLayerOrder( layer, i );
|
||||||
|
|
Loading…
Reference in New Issue