Save simulator checkbox settings in project file
Fixes https://gitlab.com/kicad/code/kicad/issues/8450
This commit is contained in:
parent
1a23502e98
commit
6dfd655a7f
|
@ -100,7 +100,6 @@ DIALOG_SIM_SETTINGS::DIALOG_SIM_SETTINGS( wxWindow* aParent,
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
m_sdbSizerOK->SetDefault();
|
||||||
updateNetlistOpts();
|
updateNetlistOpts();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString DIALOG_SIM_SETTINGS::evaluateDCControls( wxChoice* aDcSource, wxTextCtrl* aDcStart,
|
wxString DIALOG_SIM_SETTINGS::evaluateDCControls( wxChoice* aDcSource, wxTextCtrl* aDcStart,
|
||||||
|
@ -298,12 +297,13 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
if( previousSimCommand != m_simCommand )
|
if( previousSimCommand != m_simCommand )
|
||||||
{
|
|
||||||
m_simCommand.Trim();
|
m_simCommand.Trim();
|
||||||
}
|
|
||||||
|
|
||||||
updateNetlistOpts();
|
updateNetlistOpts();
|
||||||
|
|
||||||
|
m_settings->SetFixPassiveVals( m_netlistOpts & NET_ADJUST_PASSIVE_VALS );
|
||||||
|
m_settings->SetFixIncludePaths( m_netlistOpts & NET_ADJUST_INCLUDE_PATHS );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,6 +314,10 @@ bool DIALOG_SIM_SETTINGS::TransferDataToWindow()
|
||||||
if( empty( m_customTxt ) )
|
if( empty( m_customTxt ) )
|
||||||
loadDirectives();
|
loadDirectives();
|
||||||
|
|
||||||
|
m_fixPassiveVals->SetValue( m_settings->GetFixPassiveVals() );
|
||||||
|
m_fixIncludePaths->SetValue( m_settings->GetFixIncludePaths() );
|
||||||
|
updateNetlistOpts();
|
||||||
|
|
||||||
NGSPICE_SIMULATOR_SETTINGS* ngspiceSettings =
|
NGSPICE_SIMULATOR_SETTINGS* ngspiceSettings =
|
||||||
dynamic_cast<NGSPICE_SIMULATOR_SETTINGS*>( m_settings.get() );
|
dynamic_cast<NGSPICE_SIMULATOR_SETTINGS*>( m_settings.get() );
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "spice_settings.h"
|
#include "spice_settings.h"
|
||||||
|
|
||||||
#include <settings/parameters.h>
|
#include <settings/parameters.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,12 +35,16 @@ SPICE_SIMULATOR_SETTINGS::SPICE_SIMULATOR_SETTINGS( JSON_SETTINGS* aParent,
|
||||||
NESTED_SETTINGS( "simulator", spiceSettingsSchemaVersion, aParent, aPath )
|
NESTED_SETTINGS( "simulator", spiceSettingsSchemaVersion, aParent, aPath )
|
||||||
{
|
{
|
||||||
m_params.emplace_back( new PARAM<wxString>( "workbook_filename", &m_workbookFilename, "" ) );
|
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 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SPICE_SIMULATOR_SETTINGS::operator==( const SPICE_SIMULATOR_SETTINGS &aRhs ) const
|
bool SPICE_SIMULATOR_SETTINGS::operator==( const SPICE_SIMULATOR_SETTINGS &aRhs ) const
|
||||||
{
|
{
|
||||||
return m_workbookFilename == aRhs.m_workbookFilename;
|
return m_workbookFilename == aRhs.m_workbookFilename
|
||||||
|
&& m_fixPassiveVals == aRhs.m_fixPassiveVals
|
||||||
|
&& m_fixIncludePaths == aRhs.m_fixIncludePaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,22 @@ public:
|
||||||
wxString GetWorkbookFilename() const { return m_workbookFilename; }
|
wxString GetWorkbookFilename() const { return m_workbookFilename; }
|
||||||
void SetWorkbookFilename( wxString aFilename ) { m_workbookFilename = aFilename; }
|
void SetWorkbookFilename( 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 )
|
||||||
|
{
|
||||||
|
m_fixIncludePaths = aFixIncludePaths;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxString m_workbookFilename;
|
wxString m_workbookFilename;
|
||||||
|
bool m_fixPassiveVals;
|
||||||
|
bool m_fixIncludePaths;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue