sim GUI: remove "Adjust value" checkbox.

We had a change in notation and this checkbox became useless.
This commit is contained in:
Fabien Corona 2022-12-02 17:48:12 +01:00 committed by Mikolaj Wielgus
parent 8f39dd69be
commit bd235048f9
7 changed files with 10 additions and 90 deletions

View File

@ -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;

View File

@ -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;
}

View File

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

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -14,6 +14,7 @@
<property name="file">dialog_sim_settings_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">DIALOG_SIM_SETTINGS_BASE</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -50,6 +52,7 @@
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Simulation settings</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
@ -2409,6 +2412,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -4833,6 +4837,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -4907,70 +4912,6 @@
<property name="name">bSizer88</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">10</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Adjust passive symbol values (e.g. M -&gt; Meg; 100 nF -&gt; 100n)</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_fixPassiveVals</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">10</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>

View File

@ -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();
};

View File

@ -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<wxString>( "workbook_filename", &m_workbookFilename, "" ) );
m_params.emplace_back( new PARAM<bool>( "fix_passive_vals", &m_fixPassiveVals, false ) );
m_params.emplace_back( new PARAM<bool>( "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;
}

View File

@ -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;
};