From 7d821cb08c159c4b4ed774f946617ddaf12c26f4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 19 Jan 2018 10:02:56 +0100 Subject: [PATCH] Fix netname layers visibility when copper layers are initially off Fixes: lp:1744183 * https://bugs.launchpad.net/kicad/+bug/1744183 --- pcbnew/pcb_draw_panel_gal.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp index 5a2dd4fed1..8ff0f5a079 100644 --- a/pcbnew/pcb_draw_panel_gal.cpp +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -298,18 +298,14 @@ void PCB_DRAW_PANEL_GAL::SyncLayersVisibility( const BOARD* aBoard ) { // Load layer & elements visibility settings for( LAYER_NUM i = 0; i < PCB_LAYER_ID_COUNT; ++i ) - { m_view->SetLayerVisible( i, aBoard->IsLayerVisible( PCB_LAYER_ID( i ) ) ); - // Synchronize netname layers as well - if( IsCopperLayer( i ) ) - m_view->SetLayerVisible( GetNetnameLayer( i ), aBoard->IsLayerVisible( PCB_LAYER_ID( i ) ) ); - } - for( GAL_LAYER_ID i = GAL_LAYER_ID_START; i < GAL_LAYER_ID_END; ++i ) - { m_view->SetLayerVisible( i, aBoard->IsElementVisible( i ) ); - } + + // Always enable netname layers, as their visibility is controlled by layer dependencies + for( LAYER_NUM i = NETNAMES_LAYER_ID_START; i < NETNAMES_LAYER_ID_END; ++i ) + m_view->SetLayerVisible( i, true ); // Enable some layers that are GAL specific m_view->SetLayerVisible( LAYER_PADS_PLATEDHOLES, true );