Merge pull request #585 from Arthur-Milchior/addButtonSaveNewFunction

addButton always save function
This commit is contained in:
Damien Elmes 2020-05-04 13:58:46 +10:00 committed by GitHub
commit 6c20e5a7df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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