From 0e705cd338ec7c0ea0f1d28f4ffd9eea67b98933 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 24 Nov 2018 10:14:33 +0100 Subject: [PATCH] Fix a minor issue in Legacy mode: DCodes were displayed regardless the visibility of the layers. --- gerbview/gbr_layout.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gerbview/gbr_layout.cpp b/gerbview/gbr_layout.cpp index 13bf416382..ccb4d176e2 100644 --- a/gerbview/gbr_layout.cpp +++ b/gerbview/gbr_layout.cpp @@ -355,6 +355,7 @@ void GBR_LAYOUT::DrawItemsDCodeID( EDA_DRAW_PANEL* aPanel, wxDC* aDC, wxString Line; GRSetDrawMode( aDC, aDrawMode ); + GERBVIEW_FRAME* gerbFrame = static_cast( aPanel->GetParent() ); for( unsigned layer = 0; layer < GetImagesList()->ImagesMaxCount(); ++layer ) { @@ -363,7 +364,7 @@ void GBR_LAYOUT::DrawItemsDCodeID( EDA_DRAW_PANEL* aPanel, wxDC* aDC, if( gerber == NULL ) // Graphic layer not yet used continue; - if( ! gerber->m_IsVisible ) + if( !gerbFrame->IsLayerVisible( layer ) ) continue; for( GERBER_DRAW_ITEM* item = gerber->GetItemsList(); item != NULL; item = item->Next() )