def OnLeftClick(self, e):
        e.StopPropagation()
        self.SetFocus()
        
        # Column resize
        if self.currentCursor == self.resizeCursor:
            self.resizing = True
            return

        # Determine row number
        x, y = self.CalcUnscrolledPosition(*(e.GetPosition()))
        row = self.RowNumberByCoords(x, y)
        if row == None:
            return

        # Handle different type of clicks
        old_selection = list(self.selection)
        if self.allowMultiple and e.ShiftDown() and len(old_selection) >= 1:
            from_row = old_selection[0]
            to_row = row
            if to_row >= from_row:
                self.selection = range(from_row, to_row+1)
            else:
                self.selection = range(to_row, from_row+1)
                self.selection.reverse()
        elif self.allowMultiple and (e.ControlDown() or e.CmdDown()):
            if row not in self.selection:
                self.selection.insert(0, row)
        else:
            self.selection = [row]

        # Emit click event
        event = CommitListEvent(EVT_COMMITLIST_SELECT_type, self.GetId())
        event.SetCurrentRow(row)
        event.SetSelection(self.selection)
        self.ProcessEvent(event)
        self.OnSelectionChanged(row, self.selection)

        # Redraw window
        self.Refresh()
dataset/ETHPy150Open gyim/stupidgit/stupidgit_gui/CommitList.py/CommitList.OnLeftClick/original