aboutsummaryrefslogtreecommitdiff
path: root/music_sampler/actions
diff options
context:
space:
mode:
Diffstat (limited to 'music_sampler/actions')
-rw-r--r--music_sampler/actions/interrupt_wait.py5
-rw-r--r--music_sampler/actions/wait.py3
2 files changed, 5 insertions, 3 deletions
diff --git a/music_sampler/actions/interrupt_wait.py b/music_sampler/actions/interrupt_wait.py
index f85a3c4..b367628 100644
--- a/music_sampler/actions/interrupt_wait.py
+++ b/music_sampler/actions/interrupt_wait.py
@@ -2,4 +2,7 @@ def run(action, wait_id=None, **kwargs):
2 action.mapping.interrupt_wait(wait_id) 2 action.mapping.interrupt_wait(wait_id)
3 3
4def description(action, wait_id=None, **kwargs): 4def description(action, wait_id=None, **kwargs):
5 return _("interrupt wait with id {}").format(wait_id) 5 if wait_id is None:
6 return _("interrupt all waits")
7 else:
8 return _("interrupt wait with id {}").format(wait_id)
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 @@
1import threading 1import threading
2 2
3def run(action, duration=0, music=None, set_wait_id=None, **kwargs): 3def run(action, duration=0, music=None, set_wait_id=None, **kwargs):
4 if set_wait_id is not None: 4 action.mapping.add_wait(action, wait_id=set_wait_id)
5 action.mapping.add_wait_id(set_wait_id, action)
6 5
7 action.sleep_event = threading.Event() 6 action.sleep_event = threading.Event()
8 action.sleep_event_timer = threading.Timer( 7 action.sleep_event_timer = threading.Timer(