Correct problem where the booklist doesn't refresh after changing/adding/deleting a vl name. Clearing the cache isn't sufficient.

This problem isn't related to the new cache. It has been there for a long time
This commit is contained in:
Charles Haley 2021-03-11 14:09:42 +00:00
parent b852195a2c
commit 48c00fd9f7

View File

@ -352,6 +352,7 @@ class SearchRestrictionMixin(object):
virt_libs[name] = search
db.new_api.set_pref('virtual_libraries', virt_libs)
db.new_api.clear_search_caches()
self.library_view.model().db.refresh()
def do_create_edit(self, name=None):
db = self.library_view.model().db
@ -498,6 +499,7 @@ class SearchRestrictionMixin(object):
'confirm_vl_removal', parent=self):
return
self._remove_vl(name, reapply=True)
self.library_view.model().db.refresh()
def choose_vl_triggerred(self):
from calibre.gui2.tweak_book.widgets import QuickOpen, emphasis_style