Skip to content

Commit

Permalink
[processing] Add ui option useCheckBoxes in ByLocation algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-morvan authored and nyalldawson committed Sep 15, 2017
1 parent 53df369 commit b08119b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions python/plugins/processing/algs/qgis/SpatialJoin.py
Expand Up @@ -96,10 +96,17 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterFeatureSource(self.JOIN,
self.tr('Join layer'),
[QgsProcessing.TypeVectorAnyGeometry]))
self.addParameter(QgsProcessingParameterEnum(self.PREDICATE,
self.tr('Geometric predicate'),
options=[p[1] for p in self.predicates],
allowMultiple=True, defaultValue=[0]))

predicate = QgsProcessingParameterEnum(self.PREDICATE,
self.tr('Geometric predicate'),
options=[p[1] for p in self.predicates],
allowMultiple=True, defaultValue=[0])
predicate.setMetadata({
'widget_wrapper': {
'class': 'processing.gui.wrappers.SelectionWidgetWrapper',
'useCheckBoxes': True,
'columns': 2}})
self.addParameter(predicate)
self.addParameter(QgsProcessingParameterField(self.JOIN_FIELDS,
self.tr('Fields to add (leave empty to use all fields)'),
parentLayerParameterName=self.JOIN,
Expand Down

0 comments on commit b08119b

Please sign in to comment.