Skip to content

Commit

Permalink
Fix matplotlib#917. The default value in the list was not being corre…
Browse files Browse the repository at this point in the history
…ctly dealt with.
  • Loading branch information
mdboom committed Jun 12, 2012
1 parent f763cd1 commit a180e1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/matplotlib/backends/qt4_editor/formlayout.py
Expand Up @@ -271,7 +271,9 @@ def setup(self):
elif isinstance(value, (str, unicode)):
field = QLineEdit(value, self)
elif isinstance(value, (list, tuple)):
selindex = list(value).pop(0)
if isinstance(value, tuple):
value = list(value)
selindex = value.pop(0)
field = QComboBox(self)
if isinstance(value[0], (list, tuple)):
keys = [ key for key, _val in value ]
Expand Down

0 comments on commit a180e1d

Please sign in to comment.