Skip to content
Permalink
Browse files

[processing] don't use full path for naming layers when loaded in dat…

…aobjects.load
  • Loading branch information
volaya authored and alexbruy committed Oct 18, 2016
1 parent 22a6c47 commit 7a87fb55b0536204a434719b87f50f496d52120b
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/plugins/processing/tools/dataobjects.py
@@ -273,14 +273,15 @@ def getObjectFromUri(uri, forceLoad=True):
settings.setValue('/Projections/defaultBehaviour', '')

# If is not opened, we open it
name = os.path.basename(uri)
for provider in ['ogr', 'postgres', 'spatialite', 'virtual']:
layer = QgsVectorLayer(uri, uri, provider)
layer = QgsVectorLayer(uri, name, provider)
if layer.isValid():
if prjSetting:
settings.setValue('/Projections/defaultBehaviour', prjSetting)
_loadedLayers[normalizeLayerSource(layer.source())] = layer
return layer
layer = QgsRasterLayer(uri, uri)
layer = QgsRasterLayer(uri, name)
if layer.isValid():
if prjSetting:
settings.setValue('/Projections/defaultBehaviour', prjSetting)

0 comments on commit 7a87fb5

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