Skip to content

Commit b08119b

Browse files
arnaud-morvannyalldawson
authored andcommittedSep 15, 2017
[processing] Add ui option useCheckBoxes in ByLocation algorithms
1 parent 53df369 commit b08119b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
 

‎python/plugins/processing/algs/qgis/SpatialJoin.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,17 @@ def initAlgorithm(self, config=None):
9696
self.addParameter(QgsProcessingParameterFeatureSource(self.JOIN,
9797
self.tr('Join layer'),
9898
[QgsProcessing.TypeVectorAnyGeometry]))
99-
self.addParameter(QgsProcessingParameterEnum(self.PREDICATE,
100-
self.tr('Geometric predicate'),
101-
options=[p[1] for p in self.predicates],
102-
allowMultiple=True, defaultValue=[0]))
99+
100+
predicate = QgsProcessingParameterEnum(self.PREDICATE,
101+
self.tr('Geometric predicate'),
102+
options=[p[1] for p in self.predicates],
103+
allowMultiple=True, defaultValue=[0])
104+
predicate.setMetadata({
105+
'widget_wrapper': {
106+
'class': 'processing.gui.wrappers.SelectionWidgetWrapper',
107+
'useCheckBoxes': True,
108+
'columns': 2}})
109+
self.addParameter(predicate)
103110
self.addParameter(QgsProcessingParameterField(self.JOIN_FIELDS,
104111
self.tr('Fields to add (leave empty to use all fields)'),
105112
parentLayerParameterName=self.JOIN,

0 commit comments

Comments
 (0)
Please sign in to comment.