- def _on_click_unit(self, row):
- self._calcsuppress = True #suppress calculations
-
- #Determine the contents of the selected row.
- selected, iter = self._unitsView.get_selection().get_selected()
-
- selected_unit = selected.get_value(iter, 0)
-
- unit_spec = self._unitDataInCategory[selected_unit]
-
- #Clear out the description
- text_model = gtk.TextBuffer(None)
- self._unitDescription.set_buffer(text_model)
-
- enditer = text_model.get_end_iter()
- text_model.insert(enditer, unit_spec[2])
+ def _on_click_unit(self, *args):
+ try:
+ selected, iter = self._unitsView.get_selection().get_selected()
+ selected_unit = selected.get_value(iter, 0)
+ unit_spec = self._unitDataInCategory[selected_unit]