Bug report #14549
Preserve trailing zeros in print composer attribute table
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||end of life|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||22522|
Whenever I insert an attribute table with virtual numeric data into my print composer, QGIS drops any trailing zeros. For example, if I round my dynamic field ($length, $area, $X ...) to two decimal digits, 12.50 becomes 12.5 and 58.00 becomes 58. Scientifically speaking, there's quite a difference between 58 and 58.00 so trailing zeros should be preserved.
I've attached a sample project with sample shapefile and print composer which demonstrates the problem. I tested this on both 2.8.7 and 2.14.0.
Regarding implementation, the easiest way would probably be to remove the code that removes trailing zeros. In the event that the current behaviour is desired for whatever reason (i.e. a feature, not a bug ;-), the better solution would be a tick box to toggle between the two or a fully fledged number formatting option like there currently is for labels, with customised number of decimal places.
#4 Updated by Giovanni Manghi about 1 year ago
- Resolution set to end of life
- Status changed from Open to Closed
End of life notice: QGIS 2.18 LTR