mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02: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:
|
def onHistory(self) -> None:
|
||||||
m = QMenu(self)
|
m = QMenu(self)
|
||||||
for nid in self.history:
|
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)
|
note = self.mw.col.getNote(nid)
|
||||||
fields = note.fields
|
fields = note.fields
|
||||||
txt = htmlToTextLine(", ".join(fields))
|
txt = htmlToTextLine(", ".join(fields))
|
||||||
|
@ -162,7 +162,7 @@ class AddCards(QDialog):
|
||||||
|
|
||||||
def editHistory(self, nid):
|
def editHistory(self, nid):
|
||||||
browser = aqt.dialogs.open("Browser", self.mw)
|
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()
|
browser.onSearchActivated()
|
||||||
|
|
||||||
def addNote(self, note) -> Optional[Note]:
|
def addNote(self, note) -> Optional[Note]:
|
||||||
|
|
Loading…
Reference in a new issue