Skip to content

Commit

Permalink
Merge pull request #4304 from Acanthostega/master
Browse files Browse the repository at this point in the history
BUG : never treat title or label values as colors in qt_editor

fixes #4303
  • Loading branch information
tacaswell committed Apr 3, 2015
2 parents adc9f82 + eeff735 commit 94e6944
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/matplotlib/backends/qt_editor/formlayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@

import datetime

BLACKLIST = set(["title", "label"])


def col2hex(color):
"""Convert matplotlib color to hex before passing to Qt"""
Expand Down Expand Up @@ -262,7 +264,7 @@ def setup(self):
continue
elif tuple_to_qfont(value) is not None:
field = FontLayout(value, self)
elif is_color_like(value):
elif label.lower() not in BLACKLIST and is_color_like(value):
field = ColorLayout(to_qcolor(value), self)
elif isinstance(value, six.string_types):
field = QtWidgets.QLineEdit(value, self)
Expand Down

0 comments on commit 94e6944

Please sign in to comment.