From 21ffec315b8fa8a6b46351021da915236148a7b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 12 Aug 2016 14:51:32 +0200 Subject: Make 'interrupt_wait' able to interrupt all waits If 'wait_id' is not specified, interrupt_wait will now stop all wait events. This fixes https://git.immae.eu/mantisbt/view.php?id=4 --- music_sampler/actions/wait.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'music_sampler/actions/wait.py') diff --git a/music_sampler/actions/wait.py b/music_sampler/actions/wait.py index e6d07f2..bcee649 100644 --- a/music_sampler/actions/wait.py +++ b/music_sampler/actions/wait.py @@ -1,8 +1,7 @@ import threading def run(action, duration=0, music=None, set_wait_id=None, **kwargs): - if set_wait_id is not None: - action.mapping.add_wait_id(set_wait_id, action) + action.mapping.add_wait(action, wait_id=set_wait_id) action.sleep_event = threading.Event() action.sleep_event_timer = threading.Timer( -- cgit v1.2.3