mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
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:
parent
02e6b835f9
commit
b572adac16
@ -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):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user