Skip to content
Permalink
Browse files

[processing] Select by expression/attribute can run on geometryless l…

…ayers
  • Loading branch information
nyalldawson committed Feb 19, 2018
1 parent da7ccf7 commit c07f37a5cbb8ab87faecf20b333907408380b259
@@ -27,6 +27,7 @@

from qgis.PyQt.QtCore import QVariant
from qgis.core import (QgsExpression,
QgsProcessing,
QgsProcessingException,
QgsProcessingAlgorithm,
QgsProcessingParameterVectorLayer,
@@ -89,7 +90,7 @@ def initAlgorithm(self, config=None):
self.tr('does not contain')
]

self.addParameter(QgsProcessingParameterVectorLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterVectorLayer(self.INPUT, self.tr('Input layer'), types=[QgsProcessing.TypeVector]))

self.addParameter(QgsProcessingParameterField(self.FIELD,
self.tr('Selection attribute'), parentLayerParameterName=self.INPUT))
@@ -25,6 +25,7 @@
__revision__ = '$Format:%H$'

from qgis.core import (QgsExpression,
QgsProcessing,
QgsVectorLayer,
QgsProcessingAlgorithm,
QgsProcessingException,
@@ -60,7 +61,7 @@ def initAlgorithm(self, config=None):
self.tr('removing from current selection'),
self.tr('selecting within current selection')]

self.addParameter(QgsProcessingParameterVectorLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterVectorLayer(self.INPUT, self.tr('Input layer'), types=[QgsProcessing.TypeVector]))

self.addParameter(QgsProcessingParameterExpression(self.EXPRESSION,
self.tr('Expression'), parentLayerParameterName=self.INPUT))

0 comments on commit c07f37a

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