Skip to content
Permalink
Browse files

[processing] Fix misleading errors in grid algorithms

  • Loading branch information
nyalldawson committed Jan 23, 2018
1 parent 7d60329 commit c87f5aad1b916b9f53fabec60cc6fe35603f8939
@@ -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))
@@ -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))

0 comments on commit c87f5aa

Please sign in to comment.
You can’t perform that action at this time.