Load Spice directives from schematics when Sim settings dialog is launched

This commit is contained in:
Maciej Suminski 2016-08-11 14:41:36 +02:00
parent 78526ee913
commit a83d4802f9
2 changed files with 9 additions and 2 deletions

View File

@ -171,6 +171,9 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
bool DIALOG_SIM_SETTINGS::TransferDataToWindow()
{
/// @todo one day it could interpret the sim command and fill out appropriate fields..
if( m_customTxt->IsEmpty() )
loadDirectives();
return true;
}
@ -235,7 +238,7 @@ int DIALOG_SIM_SETTINGS::ShowModal()
}
void DIALOG_SIM_SETTINGS::onLoadDirectives( wxCommandEvent& event )
void DIALOG_SIM_SETTINGS::loadDirectives()
{
if( m_exporter )
m_customTxt->SetValue( m_exporter->GetSheetSimCommand() );

View File

@ -63,7 +63,10 @@ private:
LINEAR
};
void onLoadDirectives( wxCommandEvent& event ) override;
void onLoadDirectives( wxCommandEvent& event ) override
{
loadDirectives();
}
static wxString scaleToString( int aOption )
{
@ -84,6 +87,7 @@ private:
return wxEmptyString;
}
void loadDirectives();
void updateNetlistOpts();
wxString m_simCommand;