From: Ismaƫl Bouya Date: Sun, 26 Jun 2016 17:12:47 +0000 (+0200) Subject: Don't run not enabled keys X-Git-Tag: 1.0.0~74 X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git;a=commitdiff_plain;h=f029e879b326c3b3dce3428561a280fa52b9f04c Don't run not enabled keys --- 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): self.actions.append(Action(action_name, self, **arguments)) def do_actions(self): + if not self.enabled: + return None + print("running actions for {}".format(self.key_sym)) start_time = time.time() self.parent.start_running(self, start_time)