From 22c11d1092a475c12bf8d43a93e7ded986a70328 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 6 Nov 2019 11:35:02 +0100 Subject: [PATCH] Footprint editor: remove not selectable layers from the layer box selector. 3 layers shown (but not selectable) in layer manager are removed from layer box (inner_layers is a pseudo layer, Edge_Cuts and Margin are not yet managed in Fp) --- pcbnew/toolbars_footprint_editor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/toolbars_footprint_editor.cpp b/pcbnew/toolbars_footprint_editor.cpp index a494391606..424ad4bf25 100644 --- a/pcbnew/toolbars_footprint_editor.cpp +++ b/pcbnew/toolbars_footprint_editor.cpp @@ -121,6 +121,12 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar() { m_selLayerBox = new PCB_LAYER_BOX_SELECTOR( m_mainToolBar, ID_TOOLBARH_PCB_SELECT_LAYER ); m_selLayerBox->SetBoardFrame( this ); + + // Some layers cannot be seclect (they are shown in the layer manager + // only to set the color and visibility, but not for selection) + // Disable them in layer box + m_selLayerBox->SetNotAllowedLayerSet( LSET::ForbiddenFootprintLayers() ); + m_selLayerBox->Resync(); } ReCreateLayerBox( false );