diff --git a/common/advanced_config.cpp b/common/advanced_config.cpp index e0285ddb68..8e2f8afcc6 100644 --- a/common/advanced_config.cpp +++ b/common/advanced_config.cpp @@ -213,6 +213,8 @@ static const wxChar V3DRT_BevelExtentFactor[] = wxT( "V3DRT_BevelExtentFactor" ) static const wxChar UseClipper2[] = wxT( "UseClipper2" ); +static const wxChar EnableGenerators[] = wxT( "EnableGenerators" ); + /** * The time in milliseconds to wait before displaying a disambiguation menu. */ @@ -342,6 +344,7 @@ ADVANCED_CFG::ADVANCED_CFG() m_UpdateUIEventInterval = 0; m_ShowRepairSchematic = false; m_ShowPropertiesPanel = false; + m_EnableGenerators = false; m_3DRT_BevelHeight_um = 30; m_3DRT_BevelExtentFactor = 1.0 / 16.0; @@ -512,6 +515,9 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg ) &m_DisambiguationMenuDelay, m_DisambiguationMenuDelay, 50, 10000 ) ); + configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableGenerators, + &m_EnableGenerators, m_EnableGenerators ) ); + // Special case for trace mask setting...we just grab them and set them immediately diff --git a/include/advanced_config.h b/include/advanced_config.h index c494b71fbe..6886ad1c09 100644 --- a/include/advanced_config.h +++ b/include/advanced_config.h @@ -274,6 +274,11 @@ public: */ int m_DisambiguationMenuDelay; + /** + * When true, enable support for generators + */ + bool m_EnableGenerators; + ///@} diff --git a/pcbnew/menubar_pcb_editor.cpp b/pcbnew/menubar_pcb_editor.cpp index fe375b0dfa..cb992e8f2c 100644 --- a/pcbnew/menubar_pcb_editor.cpp +++ b/pcbnew/menubar_pcb_editor.cpp @@ -312,8 +312,11 @@ void PCB_EDIT_FRAME::doReCreateMenuBar() placeMenu->Add( PCB_ACTIONS::placeText ); placeMenu->Add( PCB_ACTIONS::drawTextBox ); - placeMenu->AppendSeparator(); - placeMenu->Add( PCB_ACTIONS::placeMeanders ); + if( ADVANCED_CFG::GetCfg().m_EnableGenerators ) + { + placeMenu->AppendSeparator(); + placeMenu->Add( PCB_ACTIONS::placeMeanders ); + } placeMenu->AppendSeparator(); placeMenu->Add( PCB_ACTIONS::drawAlignedDimension ); @@ -400,11 +403,14 @@ void PCB_EDIT_FRAME::doReCreateMenuBar() toolsMenu->Add( ACTIONS::showFootprintEditor ); toolsMenu->Add( PCB_ACTIONS::updateFootprints ); - toolsMenu->AppendSeparator(); - toolsMenu->Add( PCB_ACTIONS::generatorsShowManager ); - toolsMenu->Add( PCB_ACTIONS::regenerateAll ); - toolsMenu->Add( PCB_ACTIONS::regenerateOutdated ); - toolsMenu->Add( PCB_ACTIONS::regenerateSelected ); + if( ADVANCED_CFG::GetCfg().m_EnableGenerators ) + { + toolsMenu->AppendSeparator(); + toolsMenu->Add( PCB_ACTIONS::generatorsShowManager ); + toolsMenu->Add( PCB_ACTIONS::regenerateAll ); + toolsMenu->Add( PCB_ACTIONS::regenerateOutdated ); + toolsMenu->Add( PCB_ACTIONS::regenerateSelected ); + } toolsMenu->AppendSeparator(); toolsMenu->Add( PCB_ACTIONS::cleanupTracksAndVias );