'Selection finished by `heatmap_widget due to `event`.'

def selection_finish(self, heatmap_widget, event):

    pos = heatmap_widget.mapFromScene(event.scenePos())
    (row, _) = heatmap_widget.cell_at(pos)
    (start, _) = self._heatmap_ranges[heatmap_widget]
    row = (start + row)
    if (event.modifiers() & Qt.ControlModifier):
        pass
    elif (event.modifiers() & Qt.AltModifier):
        self.selection_ranges = self.remove_range(self.selection_ranges, self._start_row, row, append=False)
    elif (len(self.selection_ranges) > 0):
        self.selection_ranges[(-1)] = (self._start_row, row)
    self.select_rows(self.combined_ranges(self.selection_ranges))
    self.selection_finished.emit()
