From ad5de719f0adf495da8d853a76c8200970cd0a06 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 29 Apr 2016 12:08:26 +0300 Subject: [PATCH] Issue #1472: Represent numerical value as real value in a string --- src/ParametersPlugin/ParametersPlugin_EvalListener.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ParametersPlugin/ParametersPlugin_EvalListener.cpp b/src/ParametersPlugin/ParametersPlugin_EvalListener.cpp index 126b0b0f0..6fd145fec 100644 --- a/src/ParametersPlugin/ParametersPlugin_EvalListener.cpp +++ b/src/ParametersPlugin/ParametersPlugin_EvalListener.cpp @@ -37,7 +37,11 @@ std::string toStdString(double theValue) { std::ostringstream sstream; sstream << theValue; - return sstream.str(); + size_t aPos = sstream.str().find("."); + std::string aPnt = ""; + if (aPos == std::string::npos) + aPnt = "."; + return sstream.str() + aPnt; } std::set toSet(const std::list& theContainer) -- 2.39.2