allow hook to modify search text

This commit is contained in:
Damien Elmes 2020-05-25 16:54:57 +10:00
parent eb032c4efb
commit f9f07a7d55

View File

@ -176,7 +176,7 @@ class DataModel(QAbstractTableModel):
ctx = SearchContext(search=txt)
gui_hooks.browser_will_search(ctx)
if ctx.card_ids is None:
ctx.card_ids = self.col.find_cards(txt, order=ctx.order)
ctx.card_ids = self.col.find_cards(ctx.search, order=ctx.order)
gui_hooks.browser_did_search(ctx)
self.cards = ctx.card_ids
except Exception as e: