Skip to content

Commit

Permalink
[processing] Fix misleading errors in grid algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 23, 2018
1 parent 7d60329 commit c87f5aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/GridLine.py
Expand Up @@ -124,11 +124,11 @@ def processAlgorithm(self, parameters, context, feedback):

if width < hSpacing:
raise QgsProcessingException(
self.tr('Horizontal spacing is too small for the covered area'))
self.tr('Horizontal spacing is too large for the covered area'))

if height < vSpacing:
raise QgsProcessingException(
self.tr('Vertical spacing is too small for the covered area'))
self.tr('Vertical spacing is too large for the covered area'))

fields = QgsFields()
fields.append(QgsField('left', QVariant.Double, '', 24, 16))
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/GridPolygon.py
Expand Up @@ -130,15 +130,15 @@ def processAlgorithm(self, parameters, context, feedback):

if width < hSpacing:
raise QgsProcessingException(
self.tr('Horizontal spacing is too small for the covered area'))
self.tr('Horizontal spacing is too large for the covered area'))

if hSpacing <= hOverlay or vSpacing <= vOverlay:
raise QgsProcessingException(
self.tr('Invalid overlay: {0}/{1}').format(hOverlay, vOverlay))

if height < vSpacing:
raise QgsProcessingException(
self.tr('Vertical spacing is too small for the covered area'))
self.tr('Vertical spacing is too large for the covered area'))

fields = QgsFields()
fields.append(QgsField('left', QVariant.Double, '', 24, 16))
Expand Down

0 comments on commit c87f5aa

Please sign in to comment.