Skip to content
Permalink
Browse files

Merge pull request #7362 from rudivs/update_maplayerwidgetwrapper

Add 'not selected' option for optional layer parameters in processing models
  • Loading branch information
luipir committed Jul 11, 2018
2 parents 014375d + 57fb4ef commit 1875b025dab6e893d39cce1de8054ad38e34532a
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/plugins/processing/gui/wrappers.py
@@ -864,10 +864,10 @@ def createWidget(self):
self.combo = QComboBox()
layers = self.getAvailableLayers()
self.combo.setEditable(True)
if self.param.flags() & QgsProcessingParameterDefinition.FlagOptional:
self.combo.addItem(self.NOT_SELECTED, self.NOT_SET_OPTION)
for layer in layers:
self.combo.addItem(self.dialog.resolveValueDescription(layer), layer)
if self.param.flags() & QgsProcessingParameterDefinition.FlagOptional:
self.combo.setEditText("")

widget = QWidget()
layout = QHBoxLayout()

0 comments on commit 1875b02

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