Fix MultipleInputDialog with options not as (value, text) (#3882)

This commit is contained in:
Arnaud Morvan 2016-12-16 16:32:04 +01:00 committed by Mathieu Pellerin
parent 6f87532ac7
commit 17ac6acd4e

View File

@ -46,7 +46,13 @@ class MultipleInputDialog(BASE, WIDGET):
self.lstLayers.setSelectionMode(QAbstractItemView.NoSelection)
self.options = options
self.options = []
for i, option in enumerate(options):
if option is None or isinstance(option, basestring):
self.options.append((i, option))
else:
self.options.append((option[0], option[1]))
self.selectedoptions = selectedoptions or []
# Additional buttons