Skip to content
Browse files
[processing] explisitly load outputs as raster or vector depending on
output type. Don't rely on extension or other indirect attributes
  • Loading branch information
alexbruy committed May 26, 2017
1 parent cea93fa commit cd7dfda193988e83e23d83f21f2b6eb41ee38467
Showing with 6 additions and 5 deletions.
  1. +4 −2 python/plugins/processing/gui/
  2. +2 −3 python/plugins/processing/tools/
@@ -70,9 +70,11 @@ def handleAlgorithmResults(alg, progress=None, showResults=True):
name = os.path.basename(out.value)
name = out.description

isRaster = True if isinstance(out, OutputRaster) else False
dataobjects.load(out.value, name,,
except Exception:
"Error loading result layer:\n" + traceback.format_exc())
@@ -156,7 +156,7 @@ def loadList(layers):

def load(fileName, name=None, crs=None, style=None):
def load(fileName, name=None, crs=None, style=None, isRaster=False):
"""Loads a layer/table into the current project, given its file.

@@ -170,8 +170,7 @@ def load(fileName, name=None, crs=None, style=None):
if name is None:
name = os.path.split(fileName)[1]

suffix = os.path.splitext(fileName)[1][1:]
if suffix in getSupportedOutputRasterLayerExtensions():
if isRaster:
qgslayer = QgsRasterLayer(fileName, name)
if qgslayer.isValid():
if crs is not None and is None:

0 comments on commit cd7dfda

Please sign in to comment.