def METHOD_NAME(self, units):
    previousUnit = self.__model.value()
    old = self.blockSignals(True)
    # clean up
    self.clear()
    units = sorted(list(units), key=lambda u: u.label)
    for unit in units:
        if self.__shortName:
            name = stringutil.latex_to_unicode(unit.short_name)
            symbol = unit.unit_symbol
            if symbol == "?":
                label = name
            else:
                symbol = stringutil.latex_to_unicode(unit.unit_symbol)
                label = "%s (%s)" % (name, symbol)
        else:
            label = stringutil.latex_to_unicode(unit.label)
        self.addItem(label, unit)
    # try to find the previous unit in the new list
    if previousUnit is None:
        currentIndex = self.currentIndex()
        index = -1
    else:
        currentIndex = self.currentIndex()
        index = self.findUnit(previousUnit)
    if index == -1:
        self.blockSignals(old)
        if currentIndex != index:
            # the previous selected unit is not anymore available
            self.setCurrentIndex(index)
    else:
        # the previous index is found
        # we dont have to emit signals
        self.setCurrentIndex(index)
        self.blockSignals(old)