On 25/10/13 18:24, Tim Hartman wrote:
Is this a bug or limitation? I checked in the current version off
github and it is still an issue.
Hi Tim - Veusz is just using the default Qt double (float) to string
conversion, which rounds off at 6 sig figures. It's the
uilocale.toString call which needs to be changed - this asks QLocale to
convert the number. The text gets converted to a float when entered,
then back to a string to be shown on the screen.
This could be changed to increase the number of significant figures (see
attached patch).
One disadvantage is that when dragging the axis bounds with the handles
is that the bound is value shows too much precision and too many digits.
This code should probably be made more intelligent to round to the
nearest useful digit.
There are other places where floats are used which could be increased in
precision, if useful.
Jeremy
diff --git a/veusz/setting/setting.py b/veusz/setting/setting.py
index 5b7467f..74348eb 100644
--- a/veusz/setting/setting.py
+++ b/veusz/setting/setting.py
@@ -588,7 +588,7 @@ class FloatOrAuto(Float):
self.val.lower() == 'auto'):
return 'Auto'
else:
- return uilocale.toString(self.val)
+ return uilocale.toString(self.val, 'g', 15)
def fromText(self, text):
if text.strip().lower() == 'auto':
_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss