mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
...
This commit is contained in:
commit
f046bd6bca
@ -34,9 +34,13 @@ class SearchRestrictionMixin(object):
|
|||||||
restriction = 'search:"%s"'%(r)
|
restriction = 'search:"%s"'%(r)
|
||||||
else:
|
else:
|
||||||
restriction = ''
|
restriction = ''
|
||||||
self.library_view.model().db.data.set_search_restriction(restriction)
|
|
||||||
self.search.clear()
|
|
||||||
self.saved_search.clear()
|
self.saved_search.clear()
|
||||||
|
# The order below is important. Set the restriction, force a '' search
|
||||||
|
# to apply it, reset the tag browser to take it into account, then set
|
||||||
|
# the book count.
|
||||||
|
self.library_view.model().db.data.set_search_restriction(restriction)
|
||||||
|
self.search.clear(emit_search=True)
|
||||||
self.tags_view.set_search_restriction(restriction)
|
self.tags_view.set_search_restriction(restriction)
|
||||||
self.set_number_of_books_shown()
|
self.set_number_of_books_shown()
|
||||||
self.current_view().setFocus(Qt.OtherFocusReason)
|
self.current_view().setFocus(Qt.OtherFocusReason)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user