mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix filename prefix is no longer shown when adding layers from
a GPX file to QGIS Fixes #37551
This commit is contained in:
parent
e4a767a39a
commit
43ee92474a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user