diff options
| author | don bright <hugh.m.bright@gmail.com> | 2012-08-01 23:43:39 (GMT) | 
|---|---|---|
| committer | don bright <hugh.m.bright@gmail.com> | 2012-08-01 23:43:39 (GMT) | 
| commit | 8e4bc5d598cd59994731f3f8cadd980e9cdad6c7 (patch) | |
| tree | 9a76c0f0f998a0abdbc2016d34bed5ff56b52540 | |
| parent | 5618f5c47f83a67beee0b6f5ae4bd52e40f100ff (diff) | |
change value so that ECHO works more like old Qstring.sprintf
| -rw-r--r-- | src/value.cc | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/src/value.cc b/src/value.cc index 666062a..3b7f357 100644 --- a/src/value.cc +++ b/src/value.cc @@ -198,7 +198,12 @@ public:      }      return tmpstr;  #else -    return boost::lexical_cast<std::string>(op1);	 +		// attempt to emulate Qt's QString.sprintf("%g"); from old OpenSCAD. +		// see https://github.com/openscad/openscad/issues/158 +		std::stringstream tmp; +		tmp.unsetf(std::ios::floatfield); +		tmp << op1; +		return tmp.str();  #endif    } | 
