Skip to content
Permalink
Browse files

fix #17456 improve CRS display in the metadata tab

  • Loading branch information
Gustry committed Nov 21, 2017
1 parent 5be5c1e commit b895b74303ff9541b55a9ee9ee12df851625eb26
Showing with 14 additions and 6 deletions.
  1. +10 −6 src/core/metadata/qgslayermetadataformatter.cpp
  2. +4 −0 src/gui/qgsmetadatawidget.cpp
@@ -96,12 +96,16 @@ QString QgsLayerMetadataFormatter::contactsSectionHtml() const
QString QgsLayerMetadataFormatter::extentSectionHtml() const
{
QString myMetadata = QStringLiteral( "<table class=\"list-view\">\n" );
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + QObject::tr( "CRS" ) + QStringLiteral( "</td><td>" ) + mMetadata.crs().authid() + QStringLiteral( " - " );
myMetadata += mMetadata.crs().description() + QStringLiteral( " - " );
if ( mMetadata.crs().isGeographic() )
myMetadata += QObject::tr( "Geographic" );
else
myMetadata += QObject::tr( "Projected" );
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + QObject::tr( "CRS" ) + QStringLiteral( "</td><td>" );
if ( mMetadata.crs().isValid() )
{
myMetadata += mMetadata.crs().authid() + QStringLiteral( " - " );
myMetadata += mMetadata.crs().description() + QStringLiteral( " - " );
if ( mMetadata.crs().isGeographic() )
myMetadata += QObject::tr( "Geographic" );
else
myMetadata += QObject::tr( "Projected" );
}
myMetadata += QLatin1String( "</td></tr>\n" );

const QgsLayerMetadata::Extent extent = mMetadata.extent();
@@ -414,6 +414,10 @@ void QgsMetadataWidget::setPropertiesFromLayer() const
{
selectionCrs->setCrs( mMetadata.crs() );
}
else
{
selectionCrs->setOptionVisible( QgsProjectionSelectionWidget::CrsNotSet, true );
}

// Links
const QList<QgsLayerMetadata::Link> &links = mMetadata.links();

0 comments on commit b895b74

Please sign in to comment.
You can’t perform that action at this time.