Browse Source

Add tracks display control to Render tab

pull/5/merge
Andrzej Wolski 8 years ago
committed by Wayne Stambaugh
parent
commit
dbafdd39b9
  1. 9
      pcbnew/class_track.cpp
  2. 1
      pcbnew/pcb_layer_widget.cpp

9
pcbnew/class_track.cpp

@ -45,6 +45,7 @@
#include <base_units.h>
#include <msgpanel.h>
#include <bitmaps.h>
#include <view/view.h>
/**
* 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 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<unsigned int>::max();
if( !aView->IsLayerVisible( LAYER_TRACKS ) )
return HIDE;
// Netnames will be shown only if zoom is appropriate
if( IsNetnameLayer( aLayer ) )
{

1
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") ),

Loading…
Cancel
Save