Skip to content

Commit

Permalink
more compact if
Browse files Browse the repository at this point in the history
  • Loading branch information
luipir committed Sep 4, 2018
1 parent b3d94f1 commit 7d1471a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/plugins/processing/algs/qgis/RasterCalculator.py
Expand Up @@ -117,9 +117,8 @@ def processAlgorithm(self, parameters, context, feedback):
crs = list(layersDict.values())[0].crs()

bbox = self.parameterAsExtent(parameters, self.EXTENT, context)
if bbox.isNull():
if not layers:
raise QgsProcessingException(self.tr("No reference layer selected nor extent box provided"))
if bbox.isNull() and not layers:
raise QgsProcessingException(self.tr("No reference layer selected nor extent box provided"))

if not bbox.isNull():
bboxCrs = self.parameterAsExtentCrs(parameters, self.EXTENT, context)
Expand Down

0 comments on commit 7d1471a

Please sign in to comment.