Commits

Aleš Erjavec  committed 3d2f34a

Handle an invalid selected index from the label combo box.

  • Participants
  • Parent commits dad955d

Comments (0)

Files changed (1)

File widgets/OWVulcanoPlot.py

         
     def clear(self):
         self.labels_combo.clear()
-#        self.values_view.clear()
         self._values_model[:] = []
         self.labels = []
         
         """ Return the current label and selected values.
         """
         i = self.labels_combo.currentIndex()
+
+        if i == -1:
+            # When clearing the labels model / combobox
+            return None, None
+
         label, all_values = self.labels[i]
         values = [all_values[i] for i in self.selection_indexes()]
         return label, values