Skip to content

Commit

Permalink
Matching default multiple fields should also be case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 22, 2017
1 parent b4a798e commit b39459b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions python/plugins/processing/gui/wrappers.py
Expand Up @@ -1361,9 +1361,17 @@ def setValue(self, value):
if self.param.allowMultiple():
options = self.widget.options
selected = []
for i, opt in enumerate(options):
if opt in value or opt == value:
selected.append(i)
if isinstance(value, str):
value = value.split(';')

for v in value:
for i, opt in enumerate(options):
if opt == v:
selected.append(i)
# case insensitive check - only do if matching case value is not present
elif v not in options and opt.lower() == v.lower():
selected.append(i)

self.widget.setSelectedItems(selected)
else:
self.widget.setField(value)
Expand Down

0 comments on commit b39459b

Please sign in to comment.