Skip to content
Browse files

[processing] Fix models cannot correctly set enum parameters

to a static choice
  • Loading branch information
nyalldawson committed May 21, 2018
1 parent 8416384 commit 6b5e5b6ed5bb421ac6ce246f68f419a914433efb
Showing with 4 additions and 0 deletions.
  1. +4 −0 python/plugins/processing/gui/
@@ -984,6 +984,10 @@ def createWidget(self, useCheckBoxes=False, columns=1):
return widget
self.combobox = QComboBox()
if self.param.flags() & QgsProcessingParameterDefinition.FlagOptional:
self.combo.addItem(self.NOT_SELECTED, self.NOT_SET_OPTION)
for i, option in enumerate(self.param.options()):
self.combobox.addItem(option, i)
values = self.dialog.getAvailableValuesOfType(QgsProcessingParameterEnum)
for v in values:
self.combobox.addItem(self.dialog.resolveValueDescription(v), v)

0 comments on commit 6b5e5b6

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