Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix raster layer names in geopackage browser data items
  • Loading branch information
elpaso committed Feb 16, 2018
1 parent 52585cf commit bbcd332
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/ogr/qgsogrdataitems.cpp
Expand Up @@ -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 ) );
Expand Down

0 comments on commit bbcd332

Please sign in to comment.