Bug report #5726
Labelling: number formatting does not work for expressions
|Affected QGIS version:
|Pull Request or Patch supplied:
|Crashes QGIS or corrupts data:
|Copied to github as #:
On the new labelling engine, there is the possibility to format numbers by limiting the decimal places and adding a + sign if the number is positive. However, it only works when choosing directly a field, not after the evaluation of an expression. This is especially an issue for $length that comes with a very impressive but quite useless precision and makes for unreadable labels by default. It also leads to some counter-intuitive behavior where choosing an expression like "value" does not give the same result as choosing the field "value".
I join a patch that extends the ability to format number to the expressions.