7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-20 00:21:31 +00:00

Don't add Sim.Params unless it contains data, and update sallen key demo.

This commit is contained in:
Jeff Young 2023-01-03 17:19:30 +00:00
parent 9583b28063
commit baa13b885f
2 changed files with 298 additions and 250 deletions
demos/simulation/sallen_key
eeschema/sim

View File

LOADING design file

View File

@ -1709,8 +1709,11 @@ void SIM_MODEL::MigrateSimModel( T_symbol& aSymbol, const PROJECT* aProject )
T_field typeField = spiceTypeInfo.CreateField( &aSymbol, SIM_MODEL::TYPE_FIELD );
aSymbol.AddField( typeField );
T_field paramsField = spiceParamsInfo.CreateField( &aSymbol, SIM_MODEL::PARAMS_FIELD );
aSymbol.AddField( paramsField );
if( !spiceParamsInfo.IsEmpty() )
{
T_field paramsField = spiceParamsInfo.CreateField( &aSymbol, SIM_MODEL::PARAMS_FIELD );
aSymbol.AddField( paramsField );
}
if( modelFromValueField )
valueField->SetText( wxT( "${SIM.PARAMS}" ) );