kopia lustrzana https://github.com/ctjacobs/pyqso
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.
rodzic
aba6bd0dd5
commit
0ae24d7fb5
|
@ -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)):
|
||||
|
|
Ładowanie…
Reference in New Issue