When deleting the last book from your book list, the cover showed on the right side bar will start showing information for the new last book. Currently, the deleted book still apearing after deletion

This commit is contained in:
Filipe 2012-05-27 19:47:53 -03:00
parent 02e6b835f9
commit b572adac16

View File

@ -267,6 +267,12 @@ class DeleteAction(InterfaceAction):
ci = view.model().index(current_row, 0)
if ci.isValid():
view.set_current_row(current_row)
elif view.row_count() > 0:
new_row = current_row - len(ids_deleted)
if new_row >= 0:
view.set_current_row(new_row)
else:
view.set_current_row(0)
def delete_books(self, *args):
'''