From ad4feab7262455b48fcba8817677892319e45e1f Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 28 Apr 2016 10:57:45 -0700 Subject: [PATCH] Avoid duplicate cmap in image options. The previous implementation was incorrect and would yield a double entry in the cmap combobox. --- lib/matplotlib/backends/qt_editor/figureoptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/backends/qt_editor/figureoptions.py b/lib/matplotlib/backends/qt_editor/figureoptions.py index a1b7b388bc33..6a485302f4e9 100644 --- a/lib/matplotlib/backends/qt_editor/figureoptions.py +++ b/lib/matplotlib/backends/qt_editor/figureoptions.py @@ -137,7 +137,7 @@ def prepare_data(d, init): for label in imagelabels: image = imagedict[label] cmap = image.get_cmap() - if cmap not in cm.cmap_d: + if cmap not in cm.cmap_d.values(): cmaps = [(cmap, cmap.name)] + cmaps imagedata = [ ('Label', label),