Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a180e1d

Browse files
committed
Fix #917. The default value in the list was not being correctly dealt with.
1 parent f763cd1 commit a180e1d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/matplotlib/backends/qt4_editor/formlayout.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ def setup(self):
271271
elif isinstance(value, (str, unicode)):
272272
field = QLineEdit(value, self)
273273
elif isinstance(value, (list, tuple)):
274-
selindex = list(value).pop(0)
274+
if isinstance(value, tuple):
275+
value = list(value)
276+
selindex = value.pop(0)
275277
field = QComboBox(self)
276278
if isinstance(value[0], (list, tuple)):
277279
keys = [ key for key, _val in value ]

0 commit comments

Comments
 (0)