Bug report #16079

Numerical value in label has excessive decimal places included

Added by Patrick Dunford almost 4 years ago. Updated about 3 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Unknown
Affected QGIS version:master Regression?:No
Operating System:Xubuntu Easy fix?:No
Pull Request or Patch supplied:No Resolution:up/downstream
Crashes QGIS or corrupts data:No Copied to github as #:23994

Description

I have a label on a field that displays a numerical value that is stored to two decimal places e.g. 21.11 (km in this case). In previous versions including the value in the label formula would simply display 21.11 for this example, or for 2.5 would simply display 2.5, or for 2 would simply display 2.

In 2.99 compared to 2.18 I now have the situation that 21.11 is being displayed on the label as 21.1099999999999999
Obviously I much prefer 21.11 as it is actually stored. I can see no reason why the label should be displayed any other way than the value actually stored in the field.

History

#1 Updated by Nyall Dawson almost 4 years ago

  • Resolution set to up/downstream
  • Status changed from Open to Closed

Upstream bug https://bugreports.qt.io/browse/QTBUG-47192 , fixed with qt 5.7 and above.

#2 Updated by Jürgen Fischer about 3 years ago

  • Category set to Unknown

Also available in: Atom PDF