From 9f7dc8b60a32b54ceff925fc33b5afcd48160581 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Sun, 22 Sep 2024 02:10:32 +0200 Subject: [PATCH] Gyro action: If Action is a bare SensitivityModifier, set speeds in the UI for it too, partially fixes #27 --- scc/gui/ae/gyro_action.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scc/gui/ae/gyro_action.py b/scc/gui/ae/gyro_action.py index 1f49c1c1..d43ba779 100644 --- a/scc/gui/ae/gyro_action.py +++ b/scc/gui/ae/gyro_action.py @@ -70,7 +70,7 @@ def load(self) -> None: self._recursing = False - def set_action(self, mode, action): + def set_action(self, mode: int, action) -> None: if self.handles(mode, action): if isinstance(action, NoAction): self.select_gyro_output("none") @@ -101,6 +101,8 @@ def set_action(self, mode, action): self.select_yaw_roll(YAW) else: self.select_yaw_roll(ROLL) + if isinstance(action, SensitivityModifier): + self.editor.set_sensitivity(*action.speeds) elif isinstance(action, GyroAction): ap = action.parameters if len(ap) == 2: