mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #7416 (Cover browser not updated after Copy to Lib+delete)
This commit is contained in:
parent
40ddee4eb6
commit
38a53cfa37
@ -233,17 +233,10 @@ class BooksModel(QAbstractTableModel): # {{{
|
|||||||
|
|
||||||
def delete_books_by_id(self, ids):
|
def delete_books_by_id(self, ids):
|
||||||
for id in ids:
|
for id in ids:
|
||||||
try:
|
|
||||||
row = self.db.row(id)
|
|
||||||
except:
|
|
||||||
row = -1
|
|
||||||
if row > -1:
|
|
||||||
self.beginRemoveRows(QModelIndex(), row, row)
|
|
||||||
self.db.delete_book(id)
|
self.db.delete_book(id)
|
||||||
if row > -1:
|
|
||||||
self.endRemoveRows()
|
|
||||||
self.count_changed()
|
self.count_changed()
|
||||||
self.clear_caches()
|
self.clear_caches()
|
||||||
|
self.reset()
|
||||||
|
|
||||||
def books_added(self, num):
|
def books_added(self, num):
|
||||||
if num > 0:
|
if num > 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user