Bug #5726
Labelling: number formatting does not work for expressions
| Status: | Closed | Start Date: | 06/03/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | Labelling | |||
| Target version: | Version 2.0.0 | |||
| Platform: | Patch supplied: | Yes | ||
| Platform version: | Affected version: | master | ||
| Status info: | Causes crash or corruption: | No | ||
| Resolution: | fixed |
Description
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.
History
Updated by Giovanni Manghi 12 months ago
- Assigned to set to Nathan Woodrow
Updated by Paolo Cavallini 9 months ago
- Target version set to Version 2.0.0
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.
Updated by Larry Shaffer about 23 hours ago
Hi,
Issue should also be fixed with 45f374f