mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Minor bug fix: fix search in the tag browser breaking the category name at the second colon, and fix search to use a category name only if that name exists.
This commit is contained in:
parent
e40834080e
commit
156bd97b17
@ -616,11 +616,14 @@ class TagBrowserWidget(QFrame): # {{{
|
|||||||
self.item_search.lineEdit().blockSignals(False)
|
self.item_search.lineEdit().blockSignals(False)
|
||||||
|
|
||||||
key = None
|
key = None
|
||||||
colon = txt.rfind(':') if len(txt) > 2 else 0
|
colon = txt.find(':') if len(txt) > 2 else 0
|
||||||
if colon > 0:
|
if colon > 0:
|
||||||
key = self._parent.library_view.model().db.\
|
key = self._parent.library_view.model().db.\
|
||||||
field_metadata.search_term_to_field_key(txt[:colon])
|
field_metadata.search_term_to_field_key(txt[:colon])
|
||||||
txt = txt[colon+1:]
|
if self._parent.library_view.model().db.field_metadata.has_key(key):
|
||||||
|
txt = txt[colon+1:]
|
||||||
|
else:
|
||||||
|
key = None
|
||||||
|
|
||||||
self.current_find_position = \
|
self.current_find_position = \
|
||||||
model.find_item_node(key, txt, self.current_find_position)
|
model.find_item_node(key, txt, self.current_find_position)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user