Changeset 1622:3d2f34a594e5 in orange-bioinformatics


Ignore:
Timestamp:
05/17/12 17:13:02 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Handle an invalid selected index from the label combo box.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • widgets/OWVulcanoPlot.py

    r1395 r1622  
    194194    def clear(self): 
    195195        self.labels_combo.clear() 
    196 #        self.values_view.clear() 
    197196        self._values_model[:] = [] 
    198197        self.labels = [] 
     
    270269        """ 
    271270        i = self.labels_combo.currentIndex() 
     271 
     272        if i == -1: 
     273            # When clearing the labels model / combobox 
     274            return None, None 
     275 
    272276        label, all_values = self.labels[i] 
    273277        values = [all_values[i] for i in self.selection_indexes()] 
Note: See TracChangeset for help on using the changeset viewer.