Bug report #20406
QgsProcessingParameterEnum doesn't allow multiple selection in the modeler
|Affected QGIS version:||3.5(master)||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||28226|
In a Processing algorithm, one of the parameter is a "QgsProcessingParameterEnum":
self.addParameter( QgsProcessingParameterEnum( self.OSM_OBJECTS, tr('OSM Objects'), options=['node', 'way', 'relation'], optional=False, defaultValue=[0, 1, 2], allowMultiple=True ))
This works well from the toolbox, I can indeed select many items and all options are checked by default.
But from the modeler, in the algorithm dialog, I can't select many items and the defaultValue is not correct. It's a simple QComboBox and by default it's only the first item is selected by default.
The user should be able to select many items and the default value (with many items selected) should work.