aboutsummaryrefslogtreecommitdiff
path: root/helpers/actions
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-07-27 02:17:39 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-07-27 02:17:39 +0200
commit62a8b07a2264101fd6d9c201267966e3c5de0cd4 (patch)
treeb11e6bc4e48e4051ee80427c391f9e4522382726 /helpers/actions
parent6c42e32d98aa2e04d446f31b8e667a280acf4b54 (diff)
downloadMusicSampler-62a8b07a2264101fd6d9c201267966e3c5de0cd4.tar.gz
MusicSampler-62a8b07a2264101fd6d9c201267966e3c5de0cd4.tar.zst
MusicSampler-62a8b07a2264101fd6d9c201267966e3c5de0cd4.zip
Add other_only flag to stop_all_actions
Diffstat (limited to 'helpers/actions')
-rw-r--r--helpers/actions/stop_all_actions.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/helpers/actions/stop_all_actions.py b/helpers/actions/stop_all_actions.py
index f3fc5fb..4ea875a 100644
--- a/helpers/actions/stop_all_actions.py
+++ b/helpers/actions/stop_all_actions.py
@@ -1,5 +1,14 @@
1def run(action, **kwargs): 1def run(action, key_start_time=0, other_only=False, **kwargs):
2 action.mapping.stop_all_running() 2 if other_only:
3 action.mapping.stop_all_running(
4 except_key=action.key,
5 key_start_time=key_start_time)
6 else:
7 action.mapping.stop_all_running()
3 8
4def description(action, **kwargs): 9def description(action, other_only=False, **kwargs):
5 return "stopping all actions" 10 message = "stopping all actions"
11 if other_only:
12 message += " except this key"
13
14 return message