We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 26a97a7 commit e35d1d0Copy full SHA for e35d1d0
python/plugins/processing/gui/enummodelerwidget.py
@@ -116,6 +116,8 @@ def defaultOptions(self):
116
for i in range(model.rowCount()):
117
item = model.item(i)
118
if item.checkState() == Qt.Checked:
119
+ if not self.allowMultiple():
120
+ return i
121
options.append(i)
122
return options if len(options) > 0 else None
123
@@ -134,7 +136,8 @@ def setOptions(self, options):
134
136
135
137
def setDefault(self, indexes):
138
model = self.lstItems.model()
-
139
+ if not isinstance(indexes, (list, tuple)):
140
+ indexes = [indexes]
141
for i in indexes:
142
143
if item:
0 commit comments