mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Insert ellipsis in history string
This commit is contained in:
parent
639ce629d8
commit
ce8ae436ea
1 changed files with 3 additions and 1 deletions
|
@ -144,7 +144,9 @@ class AddCards(QDialog):
|
|||
for nid in self.history:
|
||||
if self.mw.col.findNotes("nid:%s" % nid):
|
||||
fields = self.mw.col.getNote(nid).fields
|
||||
txt = stripHTMLMedia(",".join(fields))[:30]
|
||||
txt = stripHTMLMedia(",".join(fields))
|
||||
if len(txt) > 30:
|
||||
txt = txt[:30] + "..."
|
||||
a = m.addAction(_("Edit %s") % txt)
|
||||
a.triggered.connect(lambda b, nid=nid: self.editHistory(nid))
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue