def _update_components(self):
        combo = self.ui
        old = self._component

        combo.blockSignals(True)
        combo.clear()

        comps = self._list_components()
        for c in comps:
            combo.addItem(c.label, userData=c)

        try:
            combo.setCurrentIndex(comps.index(old))
        except __HOLE__:
            combo.setCurrentIndex(0)

        combo.blockSignals(False)
dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py/ComponenentElement._update_components