mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
Merge pull request #1330 from Arthur-Milchior/underline_history
Add Card history: keep & instead of replacing them by underline
This commit is contained in:
commit
2265bfe71d
1 changed files with 3 additions and 0 deletions
|
@ -191,6 +191,9 @@ class AddCards(QDialog):
|
||||||
txt = f"{txt[:30]}..."
|
txt = f"{txt[:30]}..."
|
||||||
line = tr.adding_edit(val=txt)
|
line = tr.adding_edit(val=txt)
|
||||||
line = gui_hooks.addcards_will_add_history_entry(line, note)
|
line = gui_hooks.addcards_will_add_history_entry(line, note)
|
||||||
|
line = line.replace("&", "&&")
|
||||||
|
# In qt action "&i" means "underline i, trigger this line when i is pressed".
|
||||||
|
# except for "&&" which is replaced by a single "&"
|
||||||
a = m.addAction(line)
|
a = m.addAction(line)
|
||||||
qconnect(a.triggered, lambda b, nid=nid: self.editHistory(nid))
|
qconnect(a.triggered, lambda b, nid=nid: self.editHistory(nid))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue