mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Refresh cover browser when a cover is changed via the edit meta information dialog
This commit is contained in:
parent
8a930b53af
commit
9b28048159
@ -135,5 +135,6 @@ def check_ebook_format(stream, current_guess):
|
||||
stream.seek(0)
|
||||
if stream.read(3) == 'TPZ':
|
||||
ans = 'tpz'
|
||||
stream.seek(0)
|
||||
return ans
|
||||
|
||||
|
@ -211,6 +211,10 @@ class BooksModel(QAbstractTableModel):
|
||||
if rows:
|
||||
self.refresh_rows(rows, current_row=current_row)
|
||||
|
||||
def refresh_cover_cache(self, ids):
|
||||
if self.cover_cache:
|
||||
self.cover_cache.refresh(ids)
|
||||
|
||||
def refresh_rows(self, rows, current_row=-1):
|
||||
for row in rows:
|
||||
if self.cover_cache:
|
||||
|
@ -1292,7 +1292,11 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
||||
break
|
||||
if rows:
|
||||
current = self.library_view.currentIndex()
|
||||
self.library_view.model().current_changed(current, previous)
|
||||
m = self.library_view.model()
|
||||
m.refresh_cover_cache(map(m.id, rows))
|
||||
if self.cover_flow:
|
||||
self.cover_flow.dataChanged()
|
||||
m.current_changed(current, previous)
|
||||
|
||||
def edit_bulk_metadata(self, checked):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user