mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
No need to assign QShortcut to variable
This commit is contained in:
parent
2d0e74ee5f
commit
e0038f8003
1 changed files with 2 additions and 2 deletions
|
@ -131,8 +131,8 @@ class Editor:
|
||||||
if cmd not in self._links:
|
if cmd not in self._links:
|
||||||
self._links[cmd] = func
|
self._links[cmd] = func
|
||||||
if keys:
|
if keys:
|
||||||
s = QShortcut(QKeySequence(keys), self.widget,
|
QShortcut(QKeySequence(keys), self.widget,
|
||||||
activated = lambda s=self: func(s))
|
activated = lambda s=self: func(s))
|
||||||
btn = self._addButton(icon, cmd, tip=tip, label=label,
|
btn = self._addButton(icon, cmd, tip=tip, label=label,
|
||||||
id=id, toggleable=toggleable)
|
id=id, toggleable=toggleable)
|
||||||
return btn
|
return btn
|
||||||
|
|
Loading…
Reference in a new issue