Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix filename prefix is no longer shown when adding layers from
a GPX file to QGIS

Fixes #37551
  • Loading branch information
nyalldawson committed Sep 2, 2020
1 parent e4a767a commit 43ee924
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -6053,9 +6053,10 @@ QList<QgsMapLayer *> QgisApp::askUserForOGRSublayers( QgsVectorLayer *layer, con
}

QgsDebugMsg( "Creating new vector layer using " + composedURI );
QString name = fileName + " " + def.layerName;
QgsVectorLayer::LayerOptions options { QgsProject::instance()->transformContext() };
options.loadDefaultStyle = false;
QgsVectorLayer *layer = new QgsVectorLayer( composedURI, def.layerName, QStringLiteral( "ogr" ), options );
QgsVectorLayer *layer = new QgsVectorLayer( composedURI, name, QStringLiteral( "ogr" ), options );
if ( layer && layer->isValid() )
{
result << layer;
Expand Down

0 comments on commit 43ee924

Please sign in to comment.