Skip to content
Permalink
Browse files

[ui] harmonize raster layer metadata path/source ordering & visibility

  • Loading branch information
nirvn committed Sep 14, 2018
1 parent 7d4a4eb commit 34e29b545bfa7a68e6bca7e71434e8cdf79eb307
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/raster/qgsrasterlayer.cpp
@@ -315,9 +315,6 @@ QString QgsRasterLayer::htmlMetadata() const
// name
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Name" ) + QStringLiteral( "</td><td>" ) + name() + QStringLiteral( "</td></tr>\n" );

// data source
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Source" ) + QStringLiteral( "</td><td>%1" ).arg( publicSource() ) + QStringLiteral( "</td></tr>\n" );

// local path
QVariantMap uriComponents = QgsProviderRegistry::instance()->decodeUri( mProviderKey, publicSource() );
QString path;
@@ -328,6 +325,10 @@ QString QgsRasterLayer::htmlMetadata() const
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Path" ) + QStringLiteral( "</td><td>%1" ).arg( QStringLiteral( "<a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( path ).toString(), QDir::toNativeSeparators( path ) ) ) + QStringLiteral( "</td></tr>\n" );
}

// data source
if ( publicSource() != path )
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Source" ) + QStringLiteral( "</td><td>%1" ).arg( publicSource() ) + QStringLiteral( "</td></tr>\n" );

// data source
if ( publicSource() != path )
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Source" ) + QStringLiteral( "</td><td>%1" ).arg( publicSource() ) + QStringLiteral( "</td></tr>\n" );

0 comments on commit 34e29b5

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