From 4c43fcfe4eeba28d3898c7eac51c61a7a27446cd Mon Sep 17 00:00:00 2001 From: David Bailey Date: Sun, 6 Aug 2017 16:03:11 +0100 Subject: [PATCH] Prevent "Shorcut key: " appearing multiple times in tooltips --- aqt/deckbrowser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aqt/deckbrowser.py b/aqt/deckbrowser.py index 00c3be181..e784188de 100644 --- a/aqt/deckbrowser.py +++ b/aqt/deckbrowser.py @@ -10,6 +10,7 @@ from anki.errors import DeckRenameError import aqt from anki.sound import clearAudioQueue from anki.hooks import runHook +from copy import deepcopy class DeckBrowser: @@ -340,7 +341,8 @@ where id > ?""", (self.mw.col.sched.dayCutoff-86400)*1000) def _drawButtons(self): buf = "" - for b in self.drawLinks: + drawLinks = deepcopy(self.drawLinks) + for b in drawLinks: if b[0]: b[0] = _("Shortcut key: %s") % shortcut(b[0]) buf += """