diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-06-26 19:12:47 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-06-26 19:12:47 +0200 |
commit | f029e879b326c3b3dce3428561a280fa52b9f04c (patch) | |
tree | 9094954cee8455ea5db34a9699ab594011137025 | |
parent | 8601cdd853f205bdbc83dd78220f5e99ab624b68 (diff) | |
download | MusicSampler-f029e879b326c3b3dce3428561a280fa52b9f04c.tar.gz MusicSampler-f029e879b326c3b3dce3428561a280fa52b9f04c.tar.zst MusicSampler-f029e879b326c3b3dce3428561a280fa52b9f04c.zip |
Don't run not enabled keys
-rw-r--r-- | helpers/key.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/helpers/key.py b/helpers/key.py index 658c17f..f49b3ec 100644 --- a/helpers/key.py +++ b/helpers/key.py | |||
@@ -80,6 +80,9 @@ class Key(ButtonBehavior, Widget): | |||
80 | self.actions.append(Action(action_name, self, **arguments)) | 80 | self.actions.append(Action(action_name, self, **arguments)) |
81 | 81 | ||
82 | def do_actions(self): | 82 | def do_actions(self): |
83 | if not self.enabled: | ||
84 | return None | ||
85 | |||
83 | print("running actions for {}".format(self.key_sym)) | 86 | print("running actions for {}".format(self.key_sym)) |
84 | start_time = time.time() | 87 | start_time = time.time() |
85 | self.parent.start_running(self, start_time) | 88 | self.parent.start_running(self, start_time) |