def OnTreeSelectionChanged(self, event):
        if self.__collapsing:
            event.Veto()
            return
        
        tree = event.GetEventObject()
        item = event.GetItem()

        # reset any current search item
        if item != self._last_search_item:
            self._last_search_item = None

        data = tree.GetItemData(item)
        if not data or not data.GetData():
            return

        ctx, node = data.GetData()
        self.SetNode(node, ctx)
dataset/ETHPy150Open manahl/mdf/mdf/viewer/frame.py/MDFViewerFrame.OnTreeSelectionChanged/original