From cf9e4e5bdd73bcdf90dd9cbae35fc8558aac0401 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Wed, 14 Jan 2026 09:13:12 -0500 Subject: [PATCH] Remove variant advanced configuration. --- common/advanced_config.cpp | 6 ---- .../dialogs/dialog_symbol_fields_table.cpp | 3 +- eeschema/menubar.cpp | 15 ++++---- eeschema/sch_edit_frame.cpp | 4 +-- eeschema/toolbars_sch_editor.cpp | 6 +--- include/advanced_config.h | 9 ----- pcbnew/toolbars_pcb_editor.cpp | 35 ++++++++----------- 7 files changed, 23 insertions(+), 55 deletions(-) diff --git a/common/advanced_config.cpp b/common/advanced_config.cpp index a53b0dc0f5..208ca51c8b 100644 --- a/common/advanced_config.cpp +++ b/common/advanced_config.cpp @@ -141,7 +141,6 @@ static const wxChar PNSProcessClusterTimeout[] = wxT( "PNSProcessClusterTimeout" static const wxChar FollowBranchTimeout[] = wxT( "FollowBranchTimeoutMs" ); static const wxChar ImportSkipComponentBodies[] = wxT( "ImportSkipComponentBodies" ); static const wxChar ScreenDPI[] = wxT( "ScreenDPI" ); -static const wxChar EnableVariantsUI[] = wxT( "EnableVariantsUI" ); static const wxChar EnableUseAuiPerspective[] = wxT( "EnableUseAuiPerspective" ); static const wxChar HistoryLockStaleTimeout[] = wxT( "HistoryLockStaleTimeout" ); static const wxChar ZoneFillIterativeRefill[] = wxT( "ZoneFillIterativeRefill" ); @@ -333,8 +332,6 @@ ADVANCED_CFG::ADVANCED_CFG() m_ScreenDPI = 91; - m_EnableVariantsUI = false; - m_EnableUseAuiPerspective = false; m_HistoryLockStaleTimeout = 300; // 5 minutes default m_ZoneFillIterativeRefill = false; @@ -645,9 +642,6 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg ) m_entries.push_back( std::make_unique( true, AC_KEYS::ScreenDPI, &m_ScreenDPI, m_ScreenDPI, 50, 500 ) ); - m_entries.push_back( std::make_unique( true, AC_KEYS::EnableVariantsUI, &m_EnableVariantsUI, - m_EnableVariantsUI ) ); - m_entries.push_back( std::make_unique( true, AC_KEYS::EnableUseAuiPerspective, &m_EnableUseAuiPerspective, m_EnableUseAuiPerspective ) ); diff --git a/eeschema/dialogs/dialog_symbol_fields_table.cpp b/eeschema/dialogs/dialog_symbol_fields_table.cpp index 417f01b743..545ecb037b 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table.cpp @@ -278,8 +278,7 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent, updateVariantButtonStates(); - if( !ADVANCED_CFG::GetCfg().m_EnableVariantsUI ) - m_splitter_left->Unsplit( m_variantsPanel ); + m_splitter_left->Unsplit( m_variantsPanel ); if( m_job ) SetTitle( m_job->GetSettingsDialogTitle() ); diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index bac5347cff..5e51f51277 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -328,15 +328,12 @@ void SCH_EDIT_FRAME::doReCreateMenuBar() toolsMenu->AppendSeparator(); toolsMenu->Add( ACTIONS::updateSchematicFromPcb )->Enable( !Kiface().IsSingle() ); - if( ADVANCED_CFG::GetCfg().m_EnableVariantsUI ) - { - toolsMenu->AppendSeparator(); - ACTION_MENU* submenuVariants = new ACTION_MENU( false, selTool ); - submenuVariants->SetTitle( _( "Variants" ) ); - submenuVariants->Add( SCH_ACTIONS::addVariant ); - submenuVariants->Add( SCH_ACTIONS::removeVariant ); - toolsMenu->Add( submenuVariants ); - } + toolsMenu->AppendSeparator(); + ACTION_MENU* submenuVariants = new ACTION_MENU( false, selTool ); + submenuVariants->SetTitle( _( "Variants" ) ); + submenuVariants->Add( SCH_ACTIONS::addVariant ); + submenuVariants->Add( SCH_ACTIONS::removeVariant ); + toolsMenu->Add( submenuVariants ); #ifdef KICAD_IPC_API toolsMenu->AppendSeparator(); diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 733f75df50..8a7bdf1635 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -473,9 +473,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : wxPoint canvas_pos = GetCanvas()->GetScreenPosition(); hierarchy_pane.FloatingPosition( canvas_pos.x + 10, canvas_pos.y + 10 ); - if( ADVANCED_CFG::GetCfg().m_EnableVariantsUI ) - Bind( wxEVT_CHOICE, &SCH_EDIT_FRAME::onVariantSelected, this ); - + Bind( wxEVT_CHOICE, &SCH_EDIT_FRAME::onVariantSelected, this ); Bind( EDA_EVT_CLOSE_DIALOG_BOOK_REPORTER, &SCH_EDIT_FRAME::onCloseSymbolDiffDialog, this ); Bind( EDA_EVT_CLOSE_ERC_DIALOG, &SCH_EDIT_FRAME::onCloseErcDialog, this ); Bind( EDA_EVT_CLOSE_DIALOG_SYMBOL_FIELDS_TABLE, &SCH_EDIT_FRAME::onCloseSymbolFieldsTableDialog, this ); diff --git a/eeschema/toolbars_sch_editor.cpp b/eeschema/toolbars_sch_editor.cpp index 6280bb06f5..b942f3fe49 100644 --- a/eeschema/toolbars_sch_editor.cpp +++ b/eeschema/toolbars_sch_editor.cpp @@ -209,8 +209,7 @@ std::optional SCH_EDIT_TOOLBAR_SETTINGS::DefaultToolbarCo config.AppendSeparator() .AppendAction( SCH_ACTIONS::showPcbNew ); - if( ADVANCED_CFG::GetCfg().m_EnableVariantsUI ) - config.AppendControl( SCH_ACTION_TOOLBAR_CONTROLS::currentVariant ); + config.AppendControl( SCH_ACTION_TOOLBAR_CONTROLS::currentVariant ); // Insert all the IPC plugins here on the toolbar // TODO (ISM): Move this to individual actions for each script @@ -228,8 +227,6 @@ void SCH_EDIT_FRAME::configureToolbars() { SCH_BASE_FRAME::configureToolbars(); - if( ADVANCED_CFG::GetCfg().m_EnableVariantsUI ) - { // Variant selection drop down control on main tool bar. auto variantSelectionCtrlFactory = [this]( ACTION_TOOLBAR* aToolbar ) @@ -247,7 +244,6 @@ void SCH_EDIT_FRAME::configureToolbars() }; RegisterCustomToolbarControlFactory( SCH_ACTION_TOOLBAR_CONTROLS::currentVariant, variantSelectionCtrlFactory ); - } // IPC/Scripting plugin control // TODO (ISM): Clean this up to make IPC actions just normal tool actions to get rid of this entire diff --git a/include/advanced_config.h b/include/advanced_config.h index 0e394d9b4f..8de6ee1059 100644 --- a/include/advanced_config.h +++ b/include/advanced_config.h @@ -896,15 +896,6 @@ public: */ int m_ScreenDPI; - /** - * Enable access to the variants user interface. - * - * Setting name: "EnableVariantsUI" - * Valid values: 0 or 1 - * Default value: 0 - */ - bool m_EnableVariantsUI; - /** * Enable use Aui Perspective to store/load geometry of main editor frames. * the saved prms are position/size of toolbars and some other widgets diff --git a/pcbnew/toolbars_pcb_editor.cpp b/pcbnew/toolbars_pcb_editor.cpp index 6243d81f48..fc17d36a99 100644 --- a/pcbnew/toolbars_pcb_editor.cpp +++ b/pcbnew/toolbars_pcb_editor.cpp @@ -344,10 +344,7 @@ std::optional PCB_EDIT_TOOLBAR_SETTINGS::DefaultToolbarCo config.AppendSeparator(); config.AppendAction( PCB_ACTIONS::showEeschema ); - - if( ADVANCED_CFG::GetCfg().m_EnableVariantsUI ) - config.AppendControl( PCB_ACTION_TOOLBAR_CONTROLS::currentVariant ); - + config.AppendControl( PCB_ACTION_TOOLBAR_CONTROLS::currentVariant ); config.AppendControl( ACTION_TOOLBAR_CONTROLS::ipcScripting ); break; @@ -423,28 +420,24 @@ void PCB_EDIT_FRAME::configureToolbars() RegisterCustomToolbarControlFactory( PCB_ACTION_TOOLBAR_CONTROLS::viaDiameter, viaDiaSelectorFactory ); - if( ADVANCED_CFG::GetCfg().m_EnableVariantsUI ) - { - // Variant selection drop down control on main tool bar - auto variantSelectionCtrlFactory = - [this]( ACTION_TOOLBAR* aToolbar ) + // Variant selection drop down control on main tool bar + auto variantSelectionCtrlFactory = + [this]( ACTION_TOOLBAR* aToolbar ) + { + if( !m_currentVariantCtrl ) { - if( !m_currentVariantCtrl ) - { - m_currentVariantCtrl = new wxChoice( aToolbar, ID_AUX_TOOLBAR_PCB_VARIANT_SELECT, - wxDefaultPosition, wxDefaultSize, 0, nullptr ); - } + m_currentVariantCtrl = new wxChoice( aToolbar, ID_AUX_TOOLBAR_PCB_VARIANT_SELECT, + wxDefaultPosition, wxDefaultSize, 0, nullptr ); + } - m_currentVariantCtrl->SetToolTip( _( "Select the current variant to display and edit." ) ); + m_currentVariantCtrl->SetToolTip( _( "Select the current variant to display and edit." ) ); - UpdateVariantSelectionCtrl(); + UpdateVariantSelectionCtrl(); - aToolbar->Add( m_currentVariantCtrl ); - }; + aToolbar->Add( m_currentVariantCtrl ); + }; - RegisterCustomToolbarControlFactory( PCB_ACTION_TOOLBAR_CONTROLS::currentVariant, - variantSelectionCtrlFactory ); - } + RegisterCustomToolbarControlFactory( PCB_ACTION_TOOLBAR_CONTROLS::currentVariant, variantSelectionCtrlFactory ); // IPC/Scripting plugin control // TODO (ISM): Clean this up to make IPC actions just normal tool actions to get rid of this entire