Changeset 1898:ce804448cf39 in orange-bioinformatics for orangecontrib/bio/widgets/OWHeatMap.py


Ignore:
Timestamp:
11/04/13 15:43:55 (5 months ago)
Author:
markotoplak
Branch:
default
Message:

Fixed selection of the cell borders in OWHeatMap. Fixes #1336

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orangecontrib/bio/widgets/OWHeatMap.py

    r1879 r1898  
    14251425        x, y = pos.x(), pos.y() 
    14261426        def clamp(i, m): 
    1427             return int(min(max(i, 0), m)) 
     1427            return int(min(max(i, 0), m-1)) 
    14281428        return (clamp(math.floor(y / self.cell_height), self.heatmap.height), 
    14291429                clamp(math.floor(x / self.cell_width), self.heatmap.width)) 
     
    19471947            selections = iter(selections) 
    19481948            start = end = selections.next() 
    1949             end_heatmaps= rows2hm[end] 
     1949            end_heatmaps = rows2hm[end] 
    19501950            try: 
    19511951                while True: 
     
    19691969                rect |= heatmap.mapToScene(heatmap.row_rect(end - h_start)).boundingRect() 
    19701970            return rect 
    1971                   
     1971              
    19721972        self.selection_rects = [] 
    19731973        for start, end, heatmaps in group_selections(self.selections): 
Note: See TracChangeset for help on using the changeset viewer.