Skip to content
Permalink
Browse files

Fix raster layer names in geopackage browser data items

  • Loading branch information
elpaso committed Feb 16, 2018
1 parent 52585cf commit bbcd332a78c7149814e99b5e6a93310f5c00f016
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/providers/ogr/qgsogrdataitems.cpp
@@ -253,7 +253,8 @@ QList<QgsOgrDbLayerInfo *> QgsOgrLayerItem::subLayers( const QString &path, cons
const QStringList layers( rlayer.dataProvider()->subLayers( ) );
for ( const QString &uri : layers )
{
QStringList pieces = uri.split( QgsDataProvider::SUBLAYER_SEPARATOR );
// Split on ':' since this is what comes out from the provider
QStringList pieces = uri.split( ':' );
QString name = pieces.value( pieces.length() - 1 );
QgsDebugMsgLevel( QStringLiteral( "Adding GeoPackage Raster item %1 %2 %3" ).arg( name, uri ), 3 );
children.append( new QgsOgrDbLayerInfo( path, uri, name, QStringLiteral( "" ), QStringLiteral( "Raster" ), QgsLayerItem::LayerType::Raster ) );

0 comments on commit bbcd332

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