If a record in row n has just been deleted then the tree will automatically go to row n+1 after deletion, rather than staying at row n. Since row n+1 might not have a record associated with it, let's do some error handling.

pull/17/head
Christian Jacobs 2013-03-24 00:20:24 +00:00
rodzic aba6bd0dd5
commit 0ae24d7fb5
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -159,6 +159,9 @@ class PyQSO(Gtk.Window):
logging.debug("Could not find the selected row's index!")
return
if(index > self.logbook.get_number_of_records()-1):
index = self.logbook.get_number_of_records()-1
record = self.logbook.get_record(index)
field_names = self.logbook.SELECTED_FIELD_NAMES_TYPES.keys()
for i in range(0, len(field_names)):