diff --git a/src/Parameters.cpp b/src/Parameters.cpp index da53eac7..c437c435 100644 --- a/src/Parameters.cpp +++ b/src/Parameters.cpp @@ -409,7 +409,10 @@ ezc3d::ParametersNS::Parameters::prepareCopyForWriting( // Ensure that the right analog scale is in the file ezc3d::ParametersNS::GroupNS::Parameter analogScaleFactorParam; std::vector analogScaleFactor; - if (params.group("ANALOG").parameter("SCALE").valuesAsDouble().size() > 0) { + if (params.group("ANALOG").parameter("USED").valuesAsInt()[0] == 0){ + analogScaleFactorParam.name("SCALE"); + } + else if (params.group("ANALOG").parameter("SCALE").valuesAsDouble().size() > 0) { analogScaleFactorParam = params.group("ANALOG").parameter("SCALE"); analogScaleFactor = params.group("ANALOG").parameter("SCALE").valuesAsDouble(); }