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

[GUI] Show the CRS Epoch up to 3 decimal digits when needed and in more places #57725

Merged

Conversation

agiudiceandrea
Copy link
Contributor

@agiudiceandrea agiudiceandrea commented Jun 10, 2024

Description

In the current implementation, the CRS Epoch value is displayed incorrectly rounded to 2 decimal digits (i.e. Epochs from 2024.246 to 2024.254 are all displayed as 2024.25). Anyway, 3 decimal digits are needed in order to have at least 1 day precision for the Epoch.

I've modified QgsCoordinateReferenceSystem::userFriendlyIdentifier() and QgsMapLayer::crsHtmlMetadata() to use
QStringLiteral( " @ %1" ).arg( qgsDoubleToString( epoch, 3 ) );
instead of
QStringLiteral( " @ %1" ).arg( epoch );

I've also added the Epoch value to the ToolTipRole of QgsLayerTreeModel::data() and of QgsMapLayerModel::data().

I think it would be useful to backport this PR to 3.34.

@github-actions github-actions bot added this to the 3.38.0 milestone Jun 10, 2024
Copy link

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 296439f)

@rouault rouault added the backport queued_ltr_backports Queued Backports label Jun 10, 2024
@nyalldawson nyalldawson merged commit fa3f88a into qgis:master Jun 10, 2024
35 checks passed
@agiudiceandrea agiudiceandrea deleted the fix-coordinate-epoch-precision branch June 10, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants