]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1472: Represent numerical value as real value in a string
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 29 Apr 2016 09:08:26 +0000 (12:08 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 29 Apr 2016 09:08:42 +0000 (12:08 +0300)
src/ParametersPlugin/ParametersPlugin_EvalListener.cpp

index 126b0b0f0346ba509e2bfa9ff761066530d59eed..6fd145fec751722210b0bb18ae89e0ca135e1893 100644 (file)
@@ -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<std::string> toSet(const std::list<std::string>& theContainer)