Skip to content


fix layer mapping in case direct use NOT in a model
Browse files Browse the repository at this point in the history
  • Loading branch information
luipir committed Aug 28, 2018
1 parent d3144b9 commit 9e2286a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/plugins/processing/algs/qgis/
Expand Up @@ -214,6 +214,12 @@ def mappedNameToLayer(self, lyr, expression, layersDict, context):

nameToMap = lyr.source()

# check if nameToMap is a file
# TODO: what about URI eg for a COG?
if os.path.isfile(nameToMap):
# get only the name without extension and path of the file
nameToMap = os.path.splitext(os.path.basename(nameToMap))[0]

# check for layers directly added in the expression
if (nameToMap + "@") in expression:
layersDict[nameToMap] = lyr
Expand Down

0 comments on commit 9e2286a

Please sign in to comment.