mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Refresh the db when on_device is refreshed only if composite columns are defined.
This commit is contained in:
parent
267687f424
commit
35bf5ed46e
@ -125,7 +125,7 @@ class BooksModel(QAbstractTableModel): # {{{
|
||||
|
||||
def refresh_ondevice(self):
|
||||
self.db.refresh_ondevice()
|
||||
self.refresh(reset=False)
|
||||
self.resort()
|
||||
self.research()
|
||||
|
||||
def set_book_on_device_func(self, func):
|
||||
|
@ -914,6 +914,8 @@ class ResultCache(SearchQueryParser): # {{{
|
||||
return len(self._map)
|
||||
|
||||
def refresh_ondevice(self, db):
|
||||
if self.composites:
|
||||
self.refresh(db)
|
||||
ondevice_col = self.FIELD_MAP['ondevice']
|
||||
for item in self._data:
|
||||
if item is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user