summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-08-02 03:03:39 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-08-02 03:03:39 (GMT)
commitfaa90661256f7fcb1227af90c764bd0e7c35f05c (patch)
treeae6b876048e36c31aae4fba14cc4fc0d2bc93a4e /src/value.cc
parentb942c728c1ac532d65bd780ba2a124dc0fb036b1 (diff)
parent83879ab41c368f674ff771387f499dc36ce124dd (diff)
Merge branch 'master' of github.com:openscad/openscad into mingw_installer
Diffstat (limited to 'src/value.cc')
-rw-r--r--src/value.cc7
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
}
contact: Jan Huwald // Impressum