Only show microvia and blind/buried via settings if they are enabled

This commit is contained in:
Jon Evans 2018-02-22 19:02:20 -05:00 committed by Wayne Stambaugh
parent 9a3ea1d53c
commit 2991c0d258
2 changed files with 9 additions and 0 deletions

View File

@ -828,6 +828,7 @@ void PCB_EDIT_FRAME::ShowDesignRulesEditor( wxCommandEvent& event )
{ {
ReCreateLayerBox(); ReCreateLayerBox();
ReCreateAuxiliaryToolbar(); ReCreateAuxiliaryToolbar();
m_Layers->ReFillRender();
OnModify(); OnModify();
} }
} }

View File

@ -388,6 +388,8 @@ void PCB_LAYER_WIDGET::SetLayersManagerTabsText()
void PCB_LAYER_WIDGET::ReFillRender() void PCB_LAYER_WIDGET::ReFillRender()
{ {
BOARD* board = myframe->GetBoard(); BOARD* board = myframe->GetBoard();
auto settings = board->GetDesignSettings();
ClearRenderRows(); ClearRenderRows();
// Add "Items" tab rows to LAYER_WIDGET, after setting color and checkbox state. // Add "Items" tab rows to LAYER_WIDGET, after setting color and checkbox state.
@ -401,6 +403,12 @@ void PCB_LAYER_WIDGET::ReFillRender()
if( m_fp_editor_mode && !isAllowedInFpMode( renderRow.id ) ) if( m_fp_editor_mode && !isAllowedInFpMode( renderRow.id ) )
continue; continue;
if( renderRow.id == LAYER_VIA_MICROVIA && !settings.m_MicroViasAllowed )
continue;
if( renderRow.id == LAYER_VIA_BBLIND && !settings.m_BlindBuriedViaAllowed )
continue;
renderRow.tooltip = wxGetTranslation( s_render_rows[row].tooltip ); renderRow.tooltip = wxGetTranslation( s_render_rows[row].tooltip );
renderRow.rowName = wxGetTranslation( s_render_rows[row].rowName ); renderRow.rowName = wxGetTranslation( s_render_rows[row].rowName );