Merge branch 'master' of github.com:dae/anki

This commit is contained in:
Damien Elmes 2017-01-10 18:35:31 +10:00
commit 6e933793f6
2 changed files with 10 additions and 6 deletions

View File

@ -12,9 +12,9 @@ provide support for problems you encounter when running from source.
Anki requires: Anki requires:
- Python 3.4+ - Python 3.5+
- Qt 5.5+ - Qt 5.5+
- PyQt5.6+ - PyQt5.7.1+
- mplayer - mplayer
- lame - lame

View File

@ -142,10 +142,14 @@ class AddCards(QDialog):
def onHistory(self): def onHistory(self):
m = QMenu(self) m = QMenu(self)
for nid in self.history: for nid in self.history:
fields = self.mw.col.getNote(nid).fields if self.mw.col.findNotes("nid:%s" % nid):
txt = stripHTMLMedia(",".join(fields))[:30] fields = self.mw.col.getNote(nid).fields
a = m.addAction(_("Edit %s") % txt) txt = stripHTMLMedia(",".join(fields))[:30]
a.triggered.connect(lambda b, nid=nid: self.editHistory(nid)) a = m.addAction(_("Edit %s") % txt)
a.triggered.connect(lambda b, nid=nid: self.editHistory(nid))
else:
a = m.addAction(_("(Note deleted)"))
a.setEnabled(False)
runHook("AddCards.onHistory", self, m) runHook("AddCards.onHistory", self, m)
m.exec_(self.historyButton.mapToGlobal(QPoint(0,0))) m.exec_(self.historyButton.mapToGlobal(QPoint(0,0)))