From 31164adaecfbea446f6abe660d0b5500a4811eca Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Sun, 26 Apr 2020 17:01:23 +0200 Subject: [PATCH] addButton always save function --- qt/aqt/editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index b269df969..e9d44b0ac 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -221,7 +221,7 @@ class Editor: disables: bool = True, ): """Assign func to bridge cmd, register shortcut, return button""" - if cmd not in self._links: + if func: self._links[cmd] = func if keys: QShortcut( # type: ignore