Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 94e6944

Browse filesBrowse 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
Copy full SHA for 94e6944

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed

‎lib/matplotlib/backends/qt_editor/formlayout.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/qt_editor/formlayout.py
+3-1Lines changed: 3 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.