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:
- Python 3.4+
- Python 3.5+
- Qt 5.5+
- PyQt5.6+
- PyQt5.7.1+
- mplayer
- lame

View File

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