aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-26 19:12:47 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-26 19:12:47 +0200
commitf029e879b326c3b3dce3428561a280fa52b9f04c (patch)
tree9094954cee8455ea5db34a9699ab594011137025
parent8601cdd853f205bdbc83dd78220f5e99ab624b68 (diff)
downloadMusicSampler-f029e879b326c3b3dce3428561a280fa52b9f04c.tar.gz
MusicSampler-f029e879b326c3b3dce3428561a280fa52b9f04c.tar.zst
MusicSampler-f029e879b326c3b3dce3428561a280fa52b9f04c.zip
Don't run not enabled keys
-rw-r--r--helpers/key.py3
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)