'Set the currently highlighted item.'

def _set_hover_item(self, item):

    if (self._highlighted_item is item):
        return
    def branches(item):
        return [self._items[ch] for ch in item.node.branches]
    if self._highlighted_item:
        pen = make_pen(Qt.blue, width=1, cosmetic=True)
        for it in postorder(self._highlighted_item, branches):
            it.setPen(pen)
    self._highlighted_item = item
    if item:
        hpen = make_pen(Qt.blue, width=2, cosmetic=True)
        for it in postorder(item, branches):
            it.setPen(hpen)
