From bd235048f92a9d556d9292d4d037a2e3679f87d9 Mon Sep 17 00:00:00 2001 From: Fabien Corona Date: Fri, 2 Dec 2022 17:48:12 +0100 Subject: [PATCH] sim GUI: remove "Adjust value" checkbox. We had a change in notation and this checkbox became useless. --- eeschema/dialogs/dialog_netlist.cpp | 3 - eeschema/dialogs/dialog_sim_settings.cpp | 5 -- eeschema/dialogs/dialog_sim_settings_base.cpp | 5 +- eeschema/dialogs/dialog_sim_settings_base.fbp | 71 ++----------------- eeschema/dialogs/dialog_sim_settings_base.h | 6 +- eeschema/sim/spice_settings.cpp | 3 - eeschema/sim/spice_settings.h | 7 -- 7 files changed, 10 insertions(+), 90 deletions(-) diff --git a/eeschema/dialogs/dialog_netlist.cpp b/eeschema/dialogs/dialog_netlist.cpp index fb1f2e51ea..075bab7d01 100644 --- a/eeschema/dialogs/dialog_netlist.cpp +++ b/eeschema/dialogs/dialog_netlist.cpp @@ -308,9 +308,6 @@ void NETLIST_DIALOG::OnRunExternSpiceCommand( wxCommandEvent& event ) wxFileName fn = m_Parent->Schematic().GetFileName(); fn.SetExt( SpiceFileExtension ); - if( settings.m_SpiceAdjustPassiveValues ) - netlist_opt |= NETLIST_EXPORTER_SPICE::OPTION_ADJUST_PASSIVE_VALS; - if( settings.m_SpiceSaveAllVoltages ) netlist_opt |= NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_VOLTAGES; diff --git a/eeschema/dialogs/dialog_sim_settings.cpp b/eeschema/dialogs/dialog_sim_settings.cpp index 6fb55ddce8..eb09209c06 100644 --- a/eeschema/dialogs/dialog_sim_settings.cpp +++ b/eeschema/dialogs/dialog_sim_settings.cpp @@ -300,7 +300,6 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow() updateNetlistOpts(); - m_settings->SetFixPassiveVals( m_netlistOpts & NETLIST_EXPORTER_SPICE::OPTION_ADJUST_PASSIVE_VALS ); m_settings->SetFixIncludePaths( m_netlistOpts & NETLIST_EXPORTER_SPICE::OPTION_ADJUST_INCLUDE_PATHS ); return true; @@ -313,7 +312,6 @@ bool DIALOG_SIM_SETTINGS::TransferDataToWindow() if( empty( m_customTxt ) ) loadDirectives(); - m_fixPassiveVals->SetValue( m_settings->GetFixPassiveVals() ); m_fixIncludePaths->SetValue( m_settings->GetFixIncludePaths() ); updateNetlistOpts(); @@ -613,9 +611,6 @@ void DIALOG_SIM_SETTINGS::updateNetlistOpts() { m_netlistOpts = NETLIST_EXPORTER_SPICE::OPTION_DEFAULT_FLAGS; - if( !m_fixPassiveVals->IsChecked() ) - m_netlistOpts &= ~NETLIST_EXPORTER_SPICE::OPTION_ADJUST_PASSIVE_VALS; - if( !m_fixIncludePaths->IsChecked() ) m_netlistOpts &= ~NETLIST_EXPORTER_SPICE::OPTION_ADJUST_INCLUDE_PATHS; } diff --git a/eeschema/dialogs/dialog_sim_settings_base.cpp b/eeschema/dialogs/dialog_sim_settings_base.cpp index 64fabd151a..a0c4a06f61 100644 --- a/eeschema/dialogs/dialog_sim_settings_base.cpp +++ b/eeschema/dialogs/dialog_sim_settings_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-88b0f50) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -433,9 +433,6 @@ DIALOG_SIM_SETTINGS_BASE::DIALOG_SIM_SETTINGS_BASE( wxWindow* parent, wxWindowID wxBoxSizer* bSizer88; bSizer88 = new wxBoxSizer( wxVERTICAL ); - m_fixPassiveVals = new wxCheckBox( this, wxID_ANY, _("Adjust passive symbol values (e.g. M -> Meg; 100 nF -> 100n)"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer88->Add( m_fixPassiveVals, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 ); - m_fixIncludePaths = new wxCheckBox( this, wxID_ANY, _("Add full path for .include library directives"), wxDefaultPosition, wxDefaultSize, 0 ); m_fixIncludePaths->SetValue(true); bSizer88->Add( m_fixIncludePaths, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 ); diff --git a/eeschema/dialogs/dialog_sim_settings_base.fbp b/eeschema/dialogs/dialog_sim_settings_base.fbp index 05ff5f7abf..fc37441ba6 100644 --- a/eeschema/dialogs/dialog_sim_settings_base.fbp +++ b/eeschema/dialogs/dialog_sim_settings_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_sim_settings_base 1000 none + 1 DIALOG_SIM_SETTINGS_BASE @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Simulation settings + 0 @@ -2409,6 +2412,7 @@ + 0 @@ -4833,6 +4837,7 @@ + 0 @@ -4907,70 +4912,6 @@ bSizer88 wxVERTICAL none - - 10 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Adjust passive symbol values (e.g. M -> Meg; 100 nF -> 100n) - - 0 - - - 0 - - 1 - m_fixPassiveVals - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - 10 wxBOTTOM|wxRIGHT|wxLEFT diff --git a/eeschema/dialogs/dialog_sim_settings_base.h b/eeschema/dialogs/dialog_sim_settings_base.h index ec541c9113..76ff28a252 100644 --- a/eeschema/dialogs/dialog_sim_settings_base.h +++ b/eeschema/dialogs/dialog_sim_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-88b0f50) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -117,7 +117,6 @@ class DIALOG_SIM_SETTINGS_BASE : public DIALOG_SHIM wxStaticText* m_staticText18; wxTextCtrl* m_customTxt; wxButton* m_loadDirectives; - wxCheckBox* m_fixPassiveVals; wxCheckBox* m_fixIncludePaths; wxBoxSizer* m_compatibilityMode; wxChoice* m_compatibilityModeChoice; @@ -126,7 +125,7 @@ class DIALOG_SIM_SETTINGS_BASE : public DIALOG_SHIM wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void onInitDlg( wxInitDialogEvent& event ) { event.Skip(); } virtual void onDCEnableSecondSource( wxCommandEvent& event ) { event.Skip(); } virtual void onDCSource1Selected( wxCommandEvent& event ) { event.Skip(); } @@ -138,6 +137,7 @@ class DIALOG_SIM_SETTINGS_BASE : public DIALOG_SHIM public: DIALOG_SIM_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Simulation settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_SIM_SETTINGS_BASE(); }; diff --git a/eeschema/sim/spice_settings.cpp b/eeschema/sim/spice_settings.cpp index df5e47a0dc..ee206b9463 100644 --- a/eeschema/sim/spice_settings.cpp +++ b/eeschema/sim/spice_settings.cpp @@ -33,11 +33,9 @@ const int spiceSettingsSchemaVersion = 0; SPICE_SIMULATOR_SETTINGS::SPICE_SIMULATOR_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath ) : NESTED_SETTINGS( "simulator", spiceSettingsSchemaVersion, aParent, aPath ), - m_fixPassiveVals( false ), m_fixIncludePaths( true ) { m_params.emplace_back( new PARAM( "workbook_filename", &m_workbookFilename, "" ) ); - m_params.emplace_back( new PARAM( "fix_passive_vals", &m_fixPassiveVals, false ) ); m_params.emplace_back( new PARAM( "fix_include_paths", &m_fixIncludePaths, true ) ); } @@ -45,7 +43,6 @@ SPICE_SIMULATOR_SETTINGS::SPICE_SIMULATOR_SETTINGS( JSON_SETTINGS* aParent, bool SPICE_SIMULATOR_SETTINGS::operator==( const SPICE_SIMULATOR_SETTINGS &aRhs ) const { return m_workbookFilename == aRhs.m_workbookFilename - && m_fixPassiveVals == aRhs.m_fixPassiveVals && m_fixIncludePaths == aRhs.m_fixIncludePaths; } diff --git a/eeschema/sim/spice_settings.h b/eeschema/sim/spice_settings.h index 2dabfc1c18..91e961efe2 100644 --- a/eeschema/sim/spice_settings.h +++ b/eeschema/sim/spice_settings.h @@ -47,12 +47,6 @@ public: wxString GetWorkbookFilename() const { return m_workbookFilename; } void SetWorkbookFilename( const wxString& aFilename ) { m_workbookFilename = aFilename; } - bool GetFixPassiveVals() const { return m_fixPassiveVals; } - void SetFixPassiveVals( bool aFixPassiveVals ) - { - m_fixPassiveVals = aFixPassiveVals; - } - bool GetFixIncludePaths() const { return m_fixIncludePaths; } void SetFixIncludePaths( bool aFixIncludePaths ) { @@ -61,7 +55,6 @@ public: private: wxString m_workbookFilename; - bool m_fixPassiveVals; bool m_fixIncludePaths; };