(self, heatmap_widget, event)
Selection finished by `heatmap_widget due to `event`.
Selection finished by `heatmap_widget due to `event`.
Selection finished by heatmap_widget due to event .
def selection_finish(self, heatmap_widget, event):
        """ Selection finished by `heatmap_widget due to `event`.
        """
        if heatmap_widget is not None:
            pos = heatmap_widget.mapFromScene(event.scenePos())
            row, _ = heatmap_widget.heatmapCellAt(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)
            else:
                if 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()
def selection_finish ( self , heatmap_widget , event ) : if heatmap_widget is not None : pos = heatmap_widget . mapFromScene ( event . scenePos ( ) ) row , _ = heatmap_widget . heatmapCellAt ( 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 ) else : if 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 ( )