Add tracks display control to Render tab

This commit is contained in:
Andrzej Wolski 2018-02-19 15:48:22 +01:00 committed by Wayne Stambaugh
parent 370232f70d
commit dbafdd39b9
2 changed files with 9 additions and 1 deletions

View File

@ -45,6 +45,7 @@
#include <base_units.h> #include <base_units.h>
#include <msgpanel.h> #include <msgpanel.h>
#include <bitmaps.h> #include <bitmaps.h>
#include <view/view.h>
/** /**
* Function ShowClearance * Function ShowClearance
@ -670,7 +671,8 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
auto frame = static_cast<PCB_BASE_FRAME*> ( panel->GetParent() ); auto frame = static_cast<PCB_BASE_FRAME*> ( panel->GetParent() );
auto color = frame->Settings().Colors().GetLayerColor( m_Layer ); auto color = frame->Settings().Colors().GetLayerColor( m_Layer );
if( brd->IsLayerVisible( m_Layer ) == false && !( aDrawMode & GR_HIGHLIGHT ) ) if( ( !brd->IsLayerVisible( m_Layer ) || !brd->IsElementVisible( LAYER_TRACKS ) )
&& !( aDrawMode & GR_HIGHLIGHT ) )
return; return;
#ifdef USE_WX_OVERLAY #ifdef USE_WX_OVERLAY
@ -798,6 +800,11 @@ void TRACK::ViewGetLayers( int aLayers[], int& aCount ) const
unsigned int TRACK::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const unsigned int TRACK::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
{ {
const int HIDE = std::numeric_limits<unsigned int>::max();
if( !aView->IsLayerVisible( LAYER_TRACKS ) )
return HIDE;
// Netnames will be shown only if zoom is appropriate // Netnames will be shown only if zoom is appropriate
if( IsNetnameLayer( aLayer ) ) if( IsNetnameLayer( aLayer ) )
{ {

View File

@ -60,6 +60,7 @@ const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = {
#define NOCOLOR COLOR4D::UNSPECIFIED // specify rows that do not have a color selector icon #define NOCOLOR COLOR4D::UNSPECIFIED // specify rows that do not have a color selector icon
// text id color tooltip // text id color tooltip
RR( _( "Tracks" ), LAYER_TRACKS, NOCOLOR, _( "Show tracks" ) ),
RR( _( "Through Via" ), LAYER_VIA_THROUGH, WHITE, _( "Show through vias" ) ), RR( _( "Through Via" ), LAYER_VIA_THROUGH, WHITE, _( "Show through vias" ) ),
RR( _( "Bl/Buried Via" ), LAYER_VIA_BBLIND, WHITE, _( "Show blind or buried vias" ) ), RR( _( "Bl/Buried Via" ), LAYER_VIA_BBLIND, WHITE, _( "Show blind or buried vias" ) ),
RR( _( "Micro Via" ), LAYER_VIA_MICROVIA, WHITE, _( "Show micro vias") ), RR( _( "Micro Via" ), LAYER_VIA_MICROVIA, WHITE, _( "Show micro vias") ),