diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 1d5e3e7719..1c5f69be75 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -45,6 +45,7 @@ #include #include #include +#include /** * Function ShowClearance @@ -670,7 +671,8 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, auto frame = static_cast ( panel->GetParent() ); 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; #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 { + const int HIDE = std::numeric_limits::max(); + + if( !aView->IsLayerVisible( LAYER_TRACKS ) ) + return HIDE; + // Netnames will be shown only if zoom is appropriate if( IsNetnameLayer( aLayer ) ) { diff --git a/pcbnew/pcb_layer_widget.cpp b/pcbnew/pcb_layer_widget.cpp index f874e25cb3..a2a184b657 100644 --- a/pcbnew/pcb_layer_widget.cpp +++ b/pcbnew/pcb_layer_widget.cpp @@ -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 // text id color tooltip + RR( _( "Tracks" ), LAYER_TRACKS, NOCOLOR, _( "Show tracks" ) ), RR( _( "Through Via" ), LAYER_VIA_THROUGH, WHITE, _( "Show through vias" ) ), RR( _( "Bl/Buried Via" ), LAYER_VIA_BBLIND, WHITE, _( "Show blind or buried vias" ) ), RR( _( "Micro Via" ), LAYER_VIA_MICROVIA, WHITE, _( "Show micro vias") ),