]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - helpers/actions/stop_all_actions.py
Add other_only flag to stop_all_actions
[perso/Immae/Projets/Python/MusicSampler.git] / helpers / actions / stop_all_actions.py
index f3fc5fbe58937f9ca95368e3fdaf241858e65c2a..4ea875a7ca3d6aa9c7d17c43cbdce0a32ee94ffa 100644 (file)
@@ -1,5 +1,14 @@
-def run(action, **kwargs):
-    action.mapping.stop_all_running()
+def run(action, key_start_time=0, other_only=False, **kwargs):
+    if other_only:
+        action.mapping.stop_all_running(
+                except_key=action.key,
+                key_start_time=key_start_time)
+    else:
+        action.mapping.stop_all_running()
 
-def description(action, **kwargs):
-    return "stopping all actions"
+def description(action, other_only=False, **kwargs):
+    message = "stopping all actions"
+    if other_only:
+        message += " except this key"
+
+    return message