Don't include non-overridden parameters in Sim.Params.

Fixes https://gitlab.com/kicad/code/kicad/issues/14369
This commit is contained in:
Jeff Young 2023-03-22 01:37:03 +00:00
parent 65eb84265b
commit 9dc16eb014
1 changed files with 3 additions and 0 deletions

View File

@ -94,6 +94,9 @@ std::string SIM_MODEL_SERIALIZER::GenerateParams() const
continue;
}
if( m_model.GetBaseModel() && m_model.GetBaseModel()->GetParam( i ).value == param.value )
continue;
// If the parameter is an enum and the value is default, don't write anything.
if( param.info.enumValues.size() >= 1 && param.value == param.info.defaultValue )
continue;