mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
commit
40abffe807
@ -268,6 +268,15 @@ class BooksModel(QAbstractTableModel): # {{{
|
|||||||
return None
|
return None
|
||||||
return self.get_current_highlighted_id()
|
return self.get_current_highlighted_id()
|
||||||
|
|
||||||
|
def highlight_ids(self, ids_to_highlight):
|
||||||
|
self.ids_to_highlight = ids_to_highlight
|
||||||
|
self.ids_to_highlight_set = set(self.ids_to_highlight)
|
||||||
|
if self.ids_to_highlight:
|
||||||
|
self.current_highlighted_idx = 0
|
||||||
|
else:
|
||||||
|
self.current_highlighted_idx = None
|
||||||
|
self.reset()
|
||||||
|
|
||||||
def search(self, text, reset=True):
|
def search(self, text, reset=True):
|
||||||
try:
|
try:
|
||||||
if self.highlight_only:
|
if self.highlight_only:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user