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

Fixes https://gitlab.com/kicad/code/kicad/issues/14369

(cherry picked from commit 9dc16eb014)
This commit is contained in:
Jeff Young 2023-03-22 01:37:03 +00:00
parent 746ab49d36
commit 09bb8fc4f4
1 changed files with 3 additions and 0 deletions

View File

@ -94,6 +94,9 @@ std::string SIM_MODEL_SERIALIZER::GenerateParams() const
continue; 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 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 ) if( param.info.enumValues.size() >= 1 && param.value == param.info.defaultValue )
continue; continue;