mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
Fix search calls in addcards
This commit is contained in:
parent
423d7e5098
commit
251fe50660
1 changed files with 2 additions and 2 deletions
|
@ -144,7 +144,7 @@ class AddCards(QDialog):
|
|||
def onHistory(self) -> None:
|
||||
m = QMenu(self)
|
||||
for nid in self.history:
|
||||
if self.mw.col.findNotes(self.col.search_string(nids=[nid])):
|
||||
if self.mw.col.findNotes(self.mw.col.search_string(nids=[nid])):
|
||||
note = self.mw.col.getNote(nid)
|
||||
fields = note.fields
|
||||
txt = htmlToTextLine(", ".join(fields))
|
||||
|
@ -162,7 +162,7 @@ class AddCards(QDialog):
|
|||
|
||||
def editHistory(self, nid):
|
||||
browser = aqt.dialogs.open("Browser", self.mw)
|
||||
browser.form.searchEdit.lineEdit().setText(self.col.search_string(nids=[nid]))
|
||||
browser.form.searchEdit.lineEdit().setText(self.mw.col.search_string(nids=[nid]))
|
||||
browser.onSearchActivated()
|
||||
|
||||
def addNote(self, note) -> Optional[Note]:
|
||||
|
|
Loading…
Reference in a new issue