Skip to content

Commit bbcd332

Browse files
committed
Fix raster layer names in geopackage browser data items
1 parent 52585cf commit bbcd332

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/providers/ogr/qgsogrdataitems.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ QList<QgsOgrDbLayerInfo *> QgsOgrLayerItem::subLayers( const QString &path, cons
253253
const QStringList layers( rlayer.dataProvider()->subLayers( ) );
254254
for ( const QString &uri : layers )
255255
{
256-
QStringList pieces = uri.split( QgsDataProvider::SUBLAYER_SEPARATOR );
256+
// Split on ':' since this is what comes out from the provider
257+
QStringList pieces = uri.split( ':' );
257258
QString name = pieces.value( pieces.length() - 1 );
258259
QgsDebugMsgLevel( QStringLiteral( "Adding GeoPackage Raster item %1 %2 %3" ).arg( name, uri ), 3 );
259260
children.append( new QgsOgrDbLayerInfo( path, uri, name, QStringLiteral( "" ), QStringLiteral( "Raster" ), QgsLayerItem::LayerType::Raster ) );

0 commit comments

Comments
 (0)