'Re enumerate the selection items and update the colors.'

def _re_enumerate_selections(self):

    items = sorted(self._selection.items(), key=(lambda item: item[0].node.value.first))
    palette = colorpalette.ColorPaletteGenerator(len(items))
    for (i, (item, selection_item)) in enumerate(items):
        del self._selection[item]
        self._selection[item] = selection_item
        color = palette[i]
        color.setAlpha(150)
        selection_item.setBrush(QColor(color))
