Merge pull request #450 from Arthur-Milchior/selectCardInBrowserFromReviewer

Current card get selected in browser
This commit is contained in:
Damien Elmes 2020-02-18 08:27:34 +10:00 committed by GitHub
commit 25ecb5d1f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -790,10 +790,11 @@ class Browser(QMainWindow):
def search(self) -> None:
if "is:current" in self._lastSearchTxt:
# show current card if there is one
c = self.mw.reviewer.card
self.card = self.mw.reviewer.card
c = self.card = self.mw.reviewer.card
nid = c and c.nid or 0
if nid:
self.model.search("nid:%d" % nid)
self.focusCid(c.id)
else:
self.model.search(self._lastSearchTxt)