Commit a73ba5b7 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

ColourMap widget doesn't complain when colourmap property is set to an unknown

colourmap (e.g. one which is registered with matplotlib, but not with the
ColourMap property)
parent 53a1989b
......@@ -595,10 +595,16 @@ def _ColourMap(parent, hasProps, propObj, propVal, labels=None, **kwargs):
return cmapObjs[0][sel]
def widgetSet(value):
if value is not None:
if value is None:
# ignore invalid selections - this allows
# the ColourMap property to accept *any*
# registered matplotlib colour map, not
# just the ones that the ColourMap property
# is aware of.
try: cbox.SetSelection(cmapObjs[0].index(value))
except ValueError: pass
# Called when the list of available
# colour maps changes - updates the
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment