Browse Source

Remove variant advanced configuration.

pull/22/head
Wayne Stambaugh 7 months ago
parent
commit
cf9e4e5bdd
  1. 6
      common/advanced_config.cpp
  2. 3
      eeschema/dialogs/dialog_symbol_fields_table.cpp
  3. 15
      eeschema/menubar.cpp
  4. 4
      eeschema/sch_edit_frame.cpp
  5. 6
      eeschema/toolbars_sch_editor.cpp
  6. 9
      include/advanced_config.h
  7. 35
      pcbnew/toolbars_pcb_editor.cpp

6
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<PARAM_CFG_INT>( true, AC_KEYS::ScreenDPI, &m_ScreenDPI, m_ScreenDPI, 50, 500 ) );
m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableVariantsUI, &m_EnableVariantsUI,
m_EnableVariantsUI ) );
m_entries.push_back( std::make_unique<PARAM_CFG_BOOL>( true, AC_KEYS::EnableUseAuiPerspective,
&m_EnableUseAuiPerspective, m_EnableUseAuiPerspective ) );

3
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() );

15
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();

4
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 );

6
eeschema/toolbars_sch_editor.cpp

@ -209,8 +209,7 @@ std::optional<TOOLBAR_CONFIGURATION> 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

9
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

35
pcbnew/toolbars_pcb_editor.cpp

@ -344,10 +344,7 @@ std::optional<TOOLBAR_CONFIGURATION> 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

Loading…
Cancel
Save