Skip to content
Permalink
Browse files

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 43ee92474a6e7fc3bb5780bf71376e05f9a0bd9d
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/app/qgisapp.cpp
@@ -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;

0 comments on commit 43ee924

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