Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homogenize number of decimal places in Identify tool (fix #27929) #47173

Merged
merged 3 commits into from
Feb 4, 2022
Merged

Homogenize number of decimal places in Identify tool (fix #27929) #47173

merged 3 commits into from
Feb 4, 2022

Conversation

alexbruy
Copy link
Contributor

@alexbruy alexbruy commented Feb 3, 2022

Description

Revival of #7836.

In the identify results panel the Length, Area and Perimeter values are displayed always with 3 decimal places, while the other values are displayed according to the settings in Project Properties → General → Coordinate Display → Precision. For UI consistency they should behave in the same way as other values.

If the value is small enough and would be shown as 0.000 (even when it's non-zero, .e.g. 0.0001) we fallback to scientific notation.

Fixes #27929.

Derived values of Length, Area and Perimiter now use the same number of
decimal places as other values which are displayed according to the
settings in Project Properties->General->Coordinate Display->Precision
@alexbruy alexbruy added the GUI/UX Related to QGIS application GUI or User Experience label Feb 3, 2022
@github-actions github-actions bot added this to the 3.24.0 milestone Feb 3, 2022
Copy link
Contributor

@elpaso elpaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

I'd like to see the test with german or french or italian locales to check that returned strings are localized correctly (I know this is already the case because of L in the string interpolation but it would be nice to have it tested).

@alexbruy
Copy link
Contributor Author

alexbruy commented Feb 4, 2022

@elpaso tests added.

@alexbruy alexbruy changed the title Homogenize number of decimal places in Identify tool Homogenize number of decimal places in Identify tool (fix #27929) Feb 4, 2022
@elpaso elpaso merged commit d5d3ed6 into qgis:master Feb 4, 2022
@alexbruy alexbruy deleted the identify-number-format branch February 4, 2022 09:24
@agiudiceandrea
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI/UX Related to QGIS application GUI or User Experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent number of decimal places in Identify tool
3 participants