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 committed Oct 4, 2016
1 parent 92e504d commit fb494ba87713f39bcde30b7d81315cee4c4b4e34
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/plugins/processing/tools/dataobjects.py
@@ -253,14 +253,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 fb494ba

Please sign in to comment.