Skip to content

Commit 94e6944

Browse files
committed
Merge pull request #4304 from Acanthostega/master
BUG : never treat title or label values as colors in qt_editor fixes #4303
2 parents adc9f82 + eeff735 commit 94e6944

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/backends/qt_editor/formlayout.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161

6262
import datetime
6363

64+
BLACKLIST = set(["title", "label"])
65+
6466

6567
def col2hex(color):
6668
"""Convert matplotlib color to hex before passing to Qt"""
@@ -262,7 +264,7 @@ def setup(self):
262264
continue
263265
elif tuple_to_qfont(value) is not None:
264266
field = FontLayout(value, self)
265-
elif is_color_like(value):
267+
elif label.lower() not in BLACKLIST and is_color_like(value):
266268
field = ColorLayout(to_qcolor(value), self)
267269
elif isinstance(value, six.string_types):
268270
field = QtWidgets.QLineEdit(value, self)

0 commit comments

Comments
 (0)