Skip to content

Commit cf4b219

Browse files
committed
Avoid duplicate cmap in image options.
The previous implementation was incorrect and would yield a double entry in the cmap combobox.
1 parent 240d24b commit cf4b219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/qt_editor/figureoptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def prepare_data(d, init):
137137
for label in imagelabels:
138138
image = imagedict[label]
139139
cmap = image.get_cmap()
140-
if cmap not in cm.cmap_d:
140+
if cmap not in cm.cmap_d.values():
141141
cmaps = [(cmap, cmap.name)] + cmaps
142142
imagedata = [
143143
('Label', label),

0 commit comments

Comments
 (0)