diff options
author | Michael van Bracht <mvb@solute.de> | 2015-09-18 16:00:29 +0200 |
---|---|---|
committer | Michael van Bracht <mvb@solute.de> | 2015-09-18 16:00:29 +0200 |
commit | 192fdab6624de8948f6932fb46a2e11d77be1734 (patch) | |
tree | 9541381ad9f85c78b8a1be74a2213e9a4881bd8f /scudcloud-1.0 | |
parent | 19a6448f66731092e3b5b7ad979379101d714a78 (diff) | |
download | scudcloud-192fdab6624de8948f6932fb46a2e11d77be1734.zip scudcloud-192fdab6624de8948f6932fb46a2e11d77be1734.tar.gz scudcloud-192fdab6624de8948f6932fb46a2e11d77be1734.tar.bz2 |
Simplify createAction with shortcut
Use only one extra branch instead of two.
Diffstat (limited to 'scudcloud-1.0')
-rwxr-xr-x | scudcloud-1.0/lib/scudcloud.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scudcloud-1.0/lib/scudcloud.py b/scudcloud-1.0/lib/scudcloud.py index b023d9d..5654f59 100755 --- a/scudcloud-1.0/lib/scudcloud.py +++ b/scudcloud-1.0/lib/scudcloud.py @@ -227,10 +227,9 @@ class ScudCloud(QtGui.QMainWindow): def createAction(self, text, slot, shortcut=None, checkable=False): action = QtGui.QAction(text, self) - if shortcut is not None: - action.setShortcut(shortcut) action.triggered.connect(slot) if shortcut is not None: + action.setShortcut(shortcut) self.addAction(action) if checkable: action.setCheckable(True) |