Labelling: number formatting does not work for expressions
|Assigned to:||Nathan Woodrow||% Done:||
|Target version:||Version 2.0.0|
|Platform version:||Affected version:||master|
|Status info:||Causes crash or corruption:||No|
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.
Updated by Nathan Woodrow 1 day ago
- Status changed from New to Closed
- Resolution set to fixed
There is now a format_number function in master.