From 43ee92474a6e7fc3bb5780bf71376e05f9a0bd9d Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 1 Sep 2020 16:47:50 +1000 Subject: [PATCH] Fix filename prefix is no longer shown when adding layers from a GPX file to QGIS Fixes #37551 --- src/app/qgisapp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index e041eb8201d..1e1b26aa655 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -6053,9 +6053,10 @@ QList 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;