Commit 73c046c8 authored by charras's avatar charras

fixed vias color and visibility problems in Layers manager

parent 98fab0b5
......@@ -555,7 +555,7 @@ void Pcb3D_GLCanvas::SetLights()
/* Create a Screenshot of the current 3D view.
* Output file format is png or jpeg, or image is copied on clipboard
* Output file format is png or jpeg, or image is copied to the clipboard
*/
void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event )
{
......@@ -568,8 +568,8 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event )
fmt_is_jpeg = TRUE;
if( event.GetId() != ID_TOOL_SCREENCOPY_TOCLIBBOARD )
{
file_ext = fmt_is_jpeg ? wxT( "jpg" ) : wxT( "png"; )
mask = wxT( "*." ) + file_ext;
file_ext = fmt_is_jpeg ? wxT( "jpg" ) : wxT( "png" );
mask = wxT( "*." ) + file_ext;
FullFileName = m_Parent->m_Parent->GetScreen()->m_FileName;
fn.SetExt( file_ext );
......
......@@ -454,11 +454,10 @@ int BOARD::GetVisibleElementColor( int aPCB_VISIBLE )
// @todo move these globals into the board.
switch( aPCB_VISIBLE )
{
case VIAS_VISIBLE: color = m_BoardSettings->m_ViaColor[VIA_THROUGH]; break;
case VIA_THROUGH_VISIBLE: color = m_BoardSettings->m_ViaColor[VIA_THROUGH]; break;
case VIA_MICROVIA_VISIBLE: color = m_BoardSettings->m_ViaColor[VIA_MICROVIA]; break;
case VIA_BBLIND_VISIBLE: color = m_BoardSettings->m_ViaColor[VIA_BLIND_BURIED]; break;
case VIA_THROUGH_VISIBLE: color = g_ModuleTextCUColor; break;
case MOD_TEXT_FR_VISIBLE: color = g_ModuleTextCUColor; break;
case MOD_TEXT_FR_VISIBLE: color = g_ModuleTextCMPColor; break;
case MOD_TEXT_BK_VISIBLE: color = g_ModuleTextCUColor; break;
case MOD_TEXT_INVISIBLE: color = g_ModuleTextNOVColor; break;
case ANCHOR_VISIBLE: color = g_AnchorColor; break;
......@@ -479,12 +478,11 @@ void BOARD::SetVisibleElementColor( int aPCB_VISIBLE, int aColor )
// @todo move these globals into the board.
switch( aPCB_VISIBLE )
{
case VIAS_VISIBLE: m_BoardSettings->m_ViaColor[VIA_THROUGH] = aColor; break;
case VIA_THROUGH_VISIBLE: m_BoardSettings->m_ViaColor[VIA_THROUGH] = aColor; break;
case VIA_MICROVIA_VISIBLE: m_BoardSettings->m_ViaColor[VIA_MICROVIA] = aColor; break;
case VIA_BBLIND_VISIBLE: m_BoardSettings->m_ViaColor[VIA_BLIND_BURIED] = aColor; break;
case VIA_THROUGH_VISIBLE: g_ModuleTextCUColor = aColor; break;
case MOD_TEXT_FR_VISIBLE: g_ModuleTextCUColor = aColor; break;
case MOD_TEXT_BK_VISIBLE: g_ModuleTextCUColor = aColor; break;
case MOD_TEXT_FR_VISIBLE: g_ModuleTextCMPColor = aColor; break;
case MOD_TEXT_BK_VISIBLE: g_ModuleTextCUColor = aColor; break;
case MOD_TEXT_INVISIBLE: g_ModuleTextNOVColor = aColor; break;
case ANCHOR_VISIBLE: g_AnchorColor = aColor; break;
case PAD_FR_VISIBLE: g_PadCMPColor = aColor; break;
......
......@@ -111,9 +111,9 @@ PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( WinEDA_PcbFrame* aParent, wxWindow* aFocusOw
#define RR LAYER_WIDGET::ROW // Render Row abreviation to reduce source width
// text id color tooltip checked
RR( _( "Through Via" ), VIAS_VISIBLE, WHITE, _( "Show through vias" ) ),
RR( _( "Bl/Buried Via" ), VIA_MICROVIA_VISIBLE, WHITE, _( "Show blind or buried vias" ) ),
RR( _( "Micro Via" ), VIA_BBLIND_VISIBLE, WHITE, _( "Show micro vias") ),
RR( _( "Through Via" ), VIA_THROUGH_VISIBLE, WHITE, _( "Show through vias" ) ),
RR( _( "Bl/Buried Via" ), VIA_BBLIND_VISIBLE, WHITE, _( "Show blind or buried vias" ) ),
RR( _( "Micro Via" ), VIA_MICROVIA_VISIBLE, WHITE, _( "Show micro vias") ),
RR( _( "Ratsnest" ), RATSNEST_VISIBLE, WHITE, _( "Show unconnected nets as a ratsnest") ),
RR( _( "Pads Front" ), PAD_FR_VISIBLE, WHITE, _( "Show footprint pads on board's front" ) ),
......
......@@ -711,21 +711,8 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent )
m_SelLayerBox->Clear();
static int layerOrder_for_display[NB_LAYERS] = {
LAYER_N_FRONT,
LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12,
LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8,
LAYER_N_7, LAYER_N_6, LAYER_N_5, LAYER_N_4,
LAYER_N_3, LAYER_N_2,
LAYER_N_BACK,
ADHESIVE_N_FRONT, ADHESIVE_N_BACK,
SOLDERPASTE_N_FRONT, SOLDERPASTE_N_BACK,
SILKSCREEN_N_FRONT, SILKSCREEN_N_BACK,
SOLDERMASK_N_FRONT, SOLDERMASK_N_BACK,
DRAW_N, COMMENT_N,
ECO1_N, ECO2_N,
EDGE_N
};
static DECLARE_LAYERS_ORDER_LIST(layerOrder_for_display);
for( int idx=0, listNdx=0; idx <= EDGE_N; idx++ )
{
int layer = layerOrder_for_display[idx];
......
......@@ -3,7 +3,7 @@
/****************/
/*
* Routines to display grid box coordinates, cursors, markers ...
* Functions to redraw the current board ...
*/
#include <vector>
......
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