

def setter(self, widget, value):
    '\n        Update the currently selected item to the one which stores value in\n        its itemData\n        '
    try:
        idx = _find_combo_data(widget, value)
    except ValueError:
        if (value is None):
            idx = (- 1)
        else:
            raise ValueError("Cannot find data '{0}' in combo box".format(value))
    widget.setCurrentIndex(idx)

dataset/ETHPy150Open glue-viz/glue/glue/utils/qt/widget_properties.py CurrentComboDataProperty.setter/original