Skip to content
Permalink
Browse files

[processing] corrected parameter definition in Eliminate

  • Loading branch information
volaya committed Sep 20, 2013
1 parent e527fe3 commit 56d6496842ad366ab89a5ab6d8946de4755afc71
Showing with 7 additions and 1 deletion.
  1. +7 −1 python/plugins/processing/algs/ftools/Eliminate.py
@@ -49,7 +49,7 @@ def defineCharacteristics(self):
self.name = "Eliminate sliver polygons"
self.group = "Vector geometry tools"
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_POLYGON]))
self.addParameter(ParameterSelection(self.MODE, "Segments", self.MODES))
self.addParameter(ParameterSelection(self.MODE, "Merge selection with the neighbouring polygon with the largest", self.MODES))
self.addOutput(OutputVector(self.OUTPUT, "Cleaned layer"))

def processAlgorithm(self, progress):
@@ -183,3 +183,9 @@ def saveChanges(self, outLayer):
msg = msg + "\n" + aStrm
outLayer.rollBack()
raise GeoAlgorithmExecutionException("Commit error:\n%s" % (msg))

def checkParameterValuesBeforeExecuting(self):
inLayer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT))
if inLayer.selectedFeatureCount() == 0:
return "No selection in input layer"

0 comments on commit 56d6496

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