From 09bb8fc4f4a88adc776ca8024f969045fe24c26c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 22 Mar 2023 01:37:03 +0000 Subject: [PATCH] Don't include non-overridden parameters in Sim.Params. Fixes https://gitlab.com/kicad/code/kicad/issues/14369 (cherry picked from commit 9dc16eb0149c8d2ce46b5c4190d978a030d81507) --- eeschema/sim/sim_model_serializer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eeschema/sim/sim_model_serializer.cpp b/eeschema/sim/sim_model_serializer.cpp index a5c515ffc6..08339ef96e 100644 --- a/eeschema/sim/sim_model_serializer.cpp +++ b/eeschema/sim/sim_model_serializer.cpp @@ -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;