From 183cd16263f72fb2799366018c63de3b9b06be98 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 23 Feb 2019 14:34:14 +0100 Subject: [PATCH] Fix precision of NumberExpression when writing to a string (reverts a3af2902ef) See also: https://forum.freecadweb.org/viewtopic.php?f=3&t=34392 --- src/App/Expression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/Expression.cpp b/src/App/Expression.cpp index 88eb3fbc33..6a6c616f03 100644 --- a/src/App/Expression.cpp +++ b/src/App/Expression.cpp @@ -268,7 +268,7 @@ void NumberExpression::negate() std::string NumberExpression::toString() const { std::stringstream s; - s << std::setprecision(std::numeric_limits::digits10 + 2) << quantity.getValue(); + s << std::setprecision(std::numeric_limits::digits10 + 1) << quantity.getValue(); /* Trim of any extra spaces */ //while (s.size() > 0 && s[s.size() - 1] == ' ')