From a180e1dc5cd4eb54ae59633dd6e7503cae825168 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Tue, 12 Jun 2012 15:19:27 -0400 Subject: [PATCH] Fix #917. The default value in the list was not being correctly dealt with. --- lib/matplotlib/backends/qt4_editor/formlayout.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/backends/qt4_editor/formlayout.py b/lib/matplotlib/backends/qt4_editor/formlayout.py index d0fe92bcf3ef..eda322dd76e9 100644 --- a/lib/matplotlib/backends/qt4_editor/formlayout.py +++ b/lib/matplotlib/backends/qt4_editor/formlayout.py @@ -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 ]